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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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";
13 import "dart:async"; 14 import "dart:async";
14 import "dart:isolate"; 15 import "dart:isolate";
15 import "dart:io"; 16 import "dart:io";
16 17
17 void main() { 18 void main() {
18 ReceivePort keepAlive = new ReceivePort(); 19 ReceivePort keepAlive = new ReceivePort();
19 SecureSocket.initialize(useBuiltinRoots: false); 20 SecureSocket.initialize(useBuiltinRoots: false);
20 testCertificateCallback(host: "www.google.dk", 21 testCertificateCallback(host: "www.google.dk",
21 acceptCertificate: false).then((_) { 22 acceptCertificate: false).then((_) {
22 testCertificateCallback(host: "www.google.dk", 23 testCertificateCallback(host: "www.google.dk",
(...skipping 30 matching lines...) Expand all
53 socket.close(); 54 socket.close();
54 return socket.fold(<int>[], (message, data) => message..addAll(data)) 55 return socket.fold(<int>[], (message, data) => message..addAll(data))
55 .then((message) { 56 .then((message) {
56 String received = new String.fromCharCodes(message); 57 String received = new String.fromCharCodes(message);
57 Expect.isTrue(received.contains('</body></html>')); 58 Expect.isTrue(received.contains('</body></html>'));
58 }); 59 });
59 }).catchError((e) { 60 }).catchError((e) {
60 Expect.isFalse(acceptCertificate); 61 Expect.isFalse(acceptCertificate);
61 }); 62 });
62 } 63 }
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