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

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

Issue 12817003: Change getRange to sublist. Make getRange deprecated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments 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 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 090d34575713d31d5a6c3bf5413222ced9e230a8..1490e711513cceb757891098bf4951bfe46aa397 100644
--- a/tests/standalone/io/web_socket_protocol_processor_test.dart
+++ b/tests/standalone/io/web_socket_protocol_processor_test.dart
@@ -120,7 +120,7 @@ void testFullMessages() {
// Update the transformer one byte at the time.
messageCount++;
for (int i = 0; i < frame.length; i++) {
- controller.add(frame.getRange(i, 1));
+ controller.add(<int>[frame[i]]);
}
Expect.equals(0, transformer._state);
Expect.isNotNull(mc.data);
@@ -129,7 +129,7 @@ void testFullMessages() {
// Update the transformer two bytes at the time.
messageCount++;
for (int i = 0; i < frame.length; i += 2) {
- controller.add(frame.getRange(i, i + 1 < frame.length ? 2 : 1));
+ controller.add(frame.sublist(i, min(i + 2, frame.length)));
}
Expect.equals(0, transformer._state);
Expect.isNotNull(mc.data);

Powered by Google App Engine
This is Rietveld 408576698