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

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

Issue 11886038: Change the WebSocket implementation to use Socket.read instead of Socket.readList (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test Created 7 years, 11 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
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 0284a057272f83799f50bef89a02b40fa5cbf023..763a8bf5d6cf590fb6598c56e2411857a2b60314 100644
--- a/tests/standalone/io/web_socket_protocol_processor_test.dart
+++ b/tests/standalone/io/web_socket_protocol_processor_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, 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.
@@ -107,7 +107,7 @@ void testFullMessages() {
// Update the processor with one big chunk.
messageCount++;
- processor.update(frame, 0, frame.length);
+ processor.update(frame);
Expect.isNull(mc.data);
Expect.equals(0, processor._state);
@@ -116,7 +116,7 @@ void testFullMessages() {
// Update the processor one byte at the time.
messageCount++;
for (int i = 0; i < frame.length; i++) {
- processor.update(frame, i, 1);
+ processor.update(frame.getRange(i, 1));
}
Expect.equals(0, processor._state);
Expect.isNull(mc.data);
@@ -124,7 +124,7 @@ void testFullMessages() {
// Update the processor two bytes at the time.
messageCount++;
for (int i = 0; i < frame.length; i += 2) {
- processor.update(frame, i, i + 1 < frame.length ? 2 : 1);
+ processor.update(frame.getRange(i, i + 1 < frame.length ? 2 : 1));
}
Expect.equals(0, processor._state);
Expect.isNull(mc.data);
@@ -177,7 +177,7 @@ void testFragmentedMessages() {
payloadSize);
frameCount++;
messageIndex += payloadSize;
- processor.update(frame, 0, frame.length);
+ processor.update(frame);
remaining -= payloadSize;
firstFrame = false;
}

Powered by Google App Engine
This is Rietveld 408576698