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

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

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month 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
« no previous file with comments | « tests/standalone/io/testing_server.dart ('k') | tools/coverage.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import "dart:convert"; 5 import "dart:convert";
6 import "dart:math"; 6 import "dart:math";
7 import "dart:async"; 7 import "dart:async";
8 import "dart:collection"; 8 import "dart:collection";
9 import "dart:typed_data"; 9 import "dart:typed_data";
10 import "dart:isolate"; 10 import "dart:isolate";
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 void onMessageData(buffer) { 44 void onMessageData(buffer) {
45 if (buffer is String) { 45 if (buffer is String) {
46 buffer = UTF8.encode(buffer); 46 buffer = UTF8.encode(buffer);
47 } 47 }
48 Expect.listEquals(expectedMessage, buffer); 48 Expect.listEquals(expectedMessage, buffer);
49 messageCount++; 49 messageCount++;
50 data = buffer; 50 data = buffer;
51 } 51 }
52 52
53 void onError(e) { 53 void onError(e, trace) {
54 String msg = "Unexpected error $e"; 54 String msg = "Unexpected error $e";
55 var trace = getAttachedStackTrace(e);
56 if (trace != null) msg += "\nStackTrace: $trace"; 55 if (trace != null) msg += "\nStackTrace: $trace";
57 Expect.fail(msg); 56 Expect.fail(msg);
58 } 57 }
59 58
60 } 59 }
61 60
62 61
63 // Web socket constants. 62 // Web socket constants.
64 const int FRAME_OPCODE_TEXT = 1; 63 const int FRAME_OPCODE_TEXT = 1;
65 const int FRAME_OPCODE_BINARY = 2; 64 const int FRAME_OPCODE_BINARY = 2;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 true, FRAME_OPCODE_BINARY, null, message, 0, message.length); 242 true, FRAME_OPCODE_BINARY, null, message, 0, message.length);
244 controller.add(frame); 243 controller.add(frame);
245 } 244 }
246 245
247 246
248 void main() { 247 void main() {
249 testFullMessages(); 248 testFullMessages();
250 testFragmentedMessages(); 249 testFragmentedMessages();
251 testUnmaskedMessage(); 250 testUnmaskedMessage();
252 } 251 }
OLDNEW
« no previous file with comments | « tests/standalone/io/testing_server.dart ('k') | tools/coverage.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698