Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: tests/standalone/io/secure_socket_bad_certificate_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_write --short_socket_read 8 // VMOptions=--short_socket_write --short_socket_read
9 // The --short_socket_write option does not work with external server 9 // The --short_socket_write option does not work with external server
10 // www.google.dk. Add this to the test when we have secure server sockets. 10 // www.google.dk. Add this to the test when we have secure server sockets.
11 // See TODO below. 11 // See TODO below.
12 12
13 import "package:expect/expect.dart";
14 import "dart:async"; 13 import "dart:async";
15 import "dart:isolate"; 14 import "dart:isolate";
16 import "dart:io"; 15 import "dart:io";
17 16
18 void main() { 17 void main() {
19 ReceivePort keepAlive = new ReceivePort(); 18 ReceivePort keepAlive = new ReceivePort();
20 SecureSocket.initialize(useBuiltinRoots: false); 19 SecureSocket.initialize(useBuiltinRoots: false);
21 testCertificateCallback(host: "www.google.dk", 20 testCertificateCallback(host: "www.google.dk",
22 acceptCertificate: false).then((_) { 21 acceptCertificate: false).then((_) {
23 testCertificateCallback(host: "www.google.dk", 22 testCertificateCallback(host: "www.google.dk",
(...skipping 30 matching lines...) Expand all
54 socket.close(); 53 socket.close();
55 return socket.reduce(<int>[], (message, data) => message..addAll(data)) 54 return socket.reduce(<int>[], (message, data) => message..addAll(data))
56 .then((message) { 55 .then((message) {
57 String received = new String.fromCharCodes(message); 56 String received = new String.fromCharCodes(message);
58 Expect.isTrue(received.contains('</body></html>')); 57 Expect.isTrue(received.contains('</body></html>'));
59 }); 58 });
60 }).catchError((e) { 59 }).catchError((e) {
61 Expect.isFalse(acceptCertificate); 60 Expect.isFalse(acceptCertificate);
62 }); 61 });
63 } 62 }
OLDNEW
« no previous file with comments | « tests/standalone/io/secure_socket_argument_test.dart ('k') | tests/standalone/io/secure_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698