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

Unified Diff: tests/standalone/io/web_socket_protocol_processor_test.dart

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/web_socket_no_secure_test.dart ('k') | tests/standalone/io/web_socket_secure_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/web_socket_protocol_processor_test.dart
diff --git a/tests/standalone/io/web_socket_protocol_processor_test.dart b/tests/standalone/io/web_socket_protocol_processor_test.dart
index 763a8bf5d6cf590fb6598c56e2411857a2b60314..6ab0da9fe143e6279ea50bd7f0ffd7ccf1f2ff12 100644
--- a/tests/standalone/io/web_socket_protocol_processor_test.dart
+++ b/tests/standalone/io/web_socket_protocol_processor_test.dart
@@ -1,9 +1,12 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import "dart:math";
+import "dart:async";
+part "../../../sdk/lib/io/http.dart";
+part "../../../sdk/lib/io/io_stream_consumer.dart";
part "../../../sdk/lib/io/websocket.dart";
part "../../../sdk/lib/io/websocket_impl.dart";
@@ -107,7 +110,7 @@ void testFullMessages() {
// Update the processor with one big chunk.
messageCount++;
- processor.update(frame);
+ processor.update(frame, 0, frame.length);
Expect.isNull(mc.data);
Expect.equals(0, processor._state);
@@ -116,7 +119,7 @@ void testFullMessages() {
// Update the processor one byte at the time.
messageCount++;
for (int i = 0; i < frame.length; i++) {
- processor.update(frame.getRange(i, 1));
+ processor.update(frame, i, 1);
}
Expect.equals(0, processor._state);
Expect.isNull(mc.data);
@@ -124,7 +127,7 @@ void testFullMessages() {
// Update the processor two bytes at the time.
messageCount++;
for (int i = 0; i < frame.length; i += 2) {
- processor.update(frame.getRange(i, i + 1 < frame.length ? 2 : 1));
+ processor.update(frame, i, i + 1 < frame.length ? 2 : 1);
}
Expect.equals(0, processor._state);
Expect.isNull(mc.data);
@@ -177,7 +180,7 @@ void testFragmentedMessages() {
payloadSize);
frameCount++;
messageIndex += payloadSize;
- processor.update(frame);
+ processor.update(frame, 0, frame.length);
remaining -= payloadSize;
firstFrame = false;
}
« no previous file with comments | « tests/standalone/io/web_socket_no_secure_test.dart ('k') | tests/standalone/io/web_socket_secure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698