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

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

Issue 16363005: Ensure that only byte values are sent by sockets and web sockets (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed a few bugs Created 7 years, 6 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 | « sdk/lib/io/websocket_impl.dart ('k') | tests/standalone/io/raw_socket_typed_data_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/raw_socket_test.dart
diff --git a/tests/standalone/io/raw_socket_test.dart b/tests/standalone/io/raw_socket_test.dart
index 609b96fdabaca5ce0e6cc6c784afd6e0dba88bf2..381c0ed2a134911c939223256601e5e114aa91a7 100644
--- a/tests/standalone/io/raw_socket_test.dart
+++ b/tests/standalone/io/raw_socket_test.dart
@@ -138,11 +138,7 @@ void testSimpleReadWrite() {
const messageSize = 1000;
List<int> createTestData() {
- List<int> data = new List<int>(messageSize);
- for (int i = 0; i < messageSize; i++) {
- data[i] = i & 0xff;
- }
- return data;
+ return new List<int>.generate(messageSize, (index) => index & 0xff);
}
void verifyTestData(List<int> data) {
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | tests/standalone/io/raw_socket_typed_data_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698