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

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

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import "dart:async"; 10 import "dart:async";
11 import "dart:io"; 11 import "dart:io";
12 import "dart:isolate"; 12 import "dart:isolate";
13 13
14 14
15 void main() { 15 void main() {
16 List<int> message = "GET / HTTP/1.0\r\nHost: www.google.dk\r\n\r\n".charCodes; 16 List<int> message = "GET / HTTP/1.0\r\nHost: www.google.dk\r\n\r\n".codeUnits;
17 int written = 0; 17 int written = 0;
18 List<String> chunks = <String>[]; 18 List<String> chunks = <String>[];
19 SecureSocket.initialize(); 19 SecureSocket.initialize();
20 // TODO(3593): Use a Dart HTTPS server for this test. 20 // TODO(3593): Use a Dart HTTPS server for this test.
21 RawSecureSocket.connect("www.google.dk", 443).then((socket) { 21 RawSecureSocket.connect("www.google.dk", 443).then((socket) {
22 socket.listen((RawSocketEvent event) { 22 socket.listen((RawSocketEvent event) {
23 switch (event) { 23 switch (event) {
24 case RawSocketEvent.READ: 24 case RawSocketEvent.READ:
25 var data = socket.read(); 25 var data = socket.read();
26 var received = new String.fromCharCodes(data); 26 var received = new String.fromCharCodes(data);
(...skipping 12 matching lines...) Expand all
39 String fullPage = chunks.join(); 39 String fullPage = chunks.join();
40 Expect.isTrue(fullPage.contains('</body></html>')); 40 Expect.isTrue(fullPage.contains('</body></html>'));
41 break; 41 break;
42 default: throw "Unexpected event $event"; 42 default: throw "Unexpected event $event";
43 } 43 }
44 }, onError: (AsyncError a) { 44 }, onError: (AsyncError a) {
45 Expect.fail("onError handler of RawSecureSocket stream hit: $a"); 45 Expect.fail("onError handler of RawSecureSocket stream hit: $a");
46 }); 46 });
47 }); 47 });
48 } 48 }
OLDNEW
« no previous file with comments | « tests/standalone/io/raw_secure_socket_pause_test.dart ('k') | tests/standalone/io/secure_client_raw_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698