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

Unified Diff: samples/chat/chat_stress_client.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | samples/chat/dart_client/chat.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/chat/chat_stress_client.dart
diff --git a/samples/chat/chat_stress_client.dart b/samples/chat/chat_stress_client.dart
index 4c1a2aae1eeaf4f89d665d42207925073915b17d..6995e007afcc921d4f8dfd6d23f68b5307181645 100644
--- a/samples/chat/chat_stress_client.dart
+++ b/samples/chat/chat_stress_client.dart
@@ -4,7 +4,7 @@
library chat_stress_client;
import 'dart:io';
-import 'dart:json';
+import 'dart:json' as json;
class ChatStressClient {
@@ -34,7 +34,7 @@ class ChatStressClient {
printServerError(response);
return null;
}
- var responseData = JSON.parse(data);
+ var responseData = json.parse(data);
if (responseData["response"] != expected ) {
printProtocolError();
return null;
@@ -52,7 +52,7 @@ class ChatStressClient {
leaveRequest["sessionId"] = sessionId;
HttpClientConnection conn = httpClient.post("127.0.0.1", port, "/leave");
conn.onRequest = (HttpClientRequest request) {
- request.outputStream.writeString(JSON.stringify(leaveRequest));
+ request.outputStream.writeString(json.stringify(leaveRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
@@ -83,7 +83,7 @@ class ChatStressClient {
HttpClientConnection conn =
httpClient.post("127.0.0.1", port, "/receive");
conn.onRequest = (HttpClientRequest request) {
- request.outputStream.writeString(JSON.stringify(messageRequest));
+ request.outputStream.writeString(json.stringify(messageRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
@@ -121,7 +121,7 @@ class ChatStressClient {
HttpClientConnection conn =
httpClient.post("127.0.0.1", port, "/message");
conn.onRequest = (HttpClientRequest request) {
- request.outputStream.writeString(JSON.stringify(messageRequest));
+ request.outputStream.writeString(json.stringify(messageRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
@@ -151,7 +151,7 @@ class ChatStressClient {
joinRequest["handle"] = "test1";
HttpClientConnection conn = httpClient.post("127.0.0.1", port, "/join");
conn.onRequest = (HttpClientRequest request) {
- request.outputStream.writeString(JSON.stringify(joinRequest));
+ request.outputStream.writeString(json.stringify(joinRequest));
request.outputStream.close();
};
conn.onResponse = (HttpClientResponse response) {
« no previous file with comments | « samples/chat/chat_server_lib.dart ('k') | samples/chat/dart_client/chat.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698