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

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

Issue 10392125: Use Uint8List instead of String when sending messages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/web_socket_test.dart
diff --git a/tests/standalone/io/web_socket_test.dart b/tests/standalone/io/web_socket_test.dart
index 336e50e17678a87429a0a1dddb67f3bff229c94b..6406dfb646d9b04e5bde0f8ae22118bf22181681 100644
--- a/tests/standalone/io/web_socket_test.dart
+++ b/tests/standalone/io/web_socket_test.dart
@@ -110,12 +110,11 @@ void testMessageLength(int messageLength) {
// Create a web socket handler and set is as the HTTP server default
// handler.
- String originalMessage = "";
- for (int i = 0; i < messageLength; i++) originalMessage += "${i % 10}";
+ Uint8List originalMessage = new Uint8List(messageLength);
WebSocketHandler wsHandler = new WebSocketHandler();
wsHandler.onOpen = (WebSocketConnection conn) {
conn.onMessage = (Object message) {
- Expect.equals(originalMessage, message);
+ Expect.listEquals(originalMessage, message);
conn.send(message);
};
conn.onClosed = (status, reason) {
@@ -126,7 +125,7 @@ void testMessageLength(int messageLength) {
HttpClientConnection conn = client.get("127.0.0.1", server.port, "/");
WebSocketClientConnection wsconn = new WebSocketClientConnection(conn);
wsconn.onMessage = (message) {
- Expect.equals(originalMessage, message);
+ Expect.listEquals(originalMessage, message);
wsconn.close();
};
wsconn.onClosed = (status, reason) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698