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

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

Issue 13863012: Refactor List.setRange function. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments. Created 7 years, 8 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/echo_server_stream_test.dart ('k') | tests/standalone/io/raw_socket_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/raw_secure_server_socket_test.dart
diff --git a/tests/standalone/io/raw_secure_server_socket_test.dart b/tests/standalone/io/raw_secure_server_socket_test.dart
index 3b3079c830f28e183194f1dc74042ccbd0c4d7ce..058b6c234da7f7a224c1bce87124a07aaa1ad132 100644
--- a/tests/standalone/io/raw_secure_server_socket_test.dart
+++ b/tests/standalone/io/raw_secure_server_socket_test.dart
@@ -173,7 +173,7 @@ void testSimpleReadWrite() {
Expect.isTrue(client.available() > 0);
var buffer = client.read();
if (buffer != null) {
- data.setRange(bytesRead, buffer.length, buffer);
+ data.setRange(bytesRead, bytesRead + buffer.length, buffer);
bytesRead += buffer.length;
for (var value in buffer) {
Expect.isTrue(value is int);
@@ -220,7 +220,8 @@ void testSimpleReadWrite() {
Expect.isTrue(socket.available() > 0);
var buffer = socket.read();
if (buffer != null) {
- dataReceived.setRange(bytesRead, buffer.length, buffer);
+ int endIndex = bytesRead + buffer.length;
+ dataReceived.setRange(bytesRead, endIndex, buffer);
bytesRead += buffer.length;
}
break;
« no previous file with comments | « tests/standalone/io/echo_server_stream_test.dart ('k') | tests/standalone/io/raw_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698