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

Side by Side Diff: tests/standalone/http_launch_test.dart

Issue 290713004: First step towards asynchronous loading of sources (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions= 4 // VMOptions=
5 // VMOptions=--short_socket_read 5 // VMOptions=--short_socket_read
6 // VMOptions=--short_socket_write 6 // VMOptions=--short_socket_write
7 // VMOptions=--short_socket_read --short_socket_write 7 // VMOptions=--short_socket_read --short_socket_write
8 // 8 //
9 // Test: 9 // Test:
10 // *) Launching a script fetched over HTTP. 10 // *) Launching a script fetched over HTTP.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Check results. 67 // Check results.
68 checkResults(results); 68 checkResults(results);
69 }); 69 });
70 } 70 }
71 71
72 checkResults(List<ProcessResult> results) { 72 checkResults(List<ProcessResult> results) {
73 Expect.equals(4, results.length); 73 Expect.equals(4, results.length);
74 // Exited cleanly. 74 // Exited cleanly.
75 for (int i = 0; i < results.length; i++) { 75 for (int i = 0; i < results.length; i++) {
76 ProcessResult result = results[i]; 76 ProcessResult result = results[i];
77 if (result.exitCode != 0) {
78 print("Exit code for process $i = ${result.exitCode}");
79 print("---stdout:---\n${result.stdout}");
80 print("---stderr:---\n${result.stderr}\n---");
81 }
77 Expect.equals(0, result.exitCode); 82 Expect.equals(0, result.exitCode);
78 } 83 }
79 String stdout = results[0].stdout; 84 String stdout = results[0].stdout;
80 // Output is the string 'hello'. Use startsWith to avoid new line differences. 85 // Output is the string 'hello'. Use startsWith to avoid new line differences.
86 if (!stdout.startsWith('hello')) {
87 print("---- stdout of remote process:\n$stdout\n----");
88 }
81 Expect.isTrue(stdout.startsWith('hello')); 89 Expect.isTrue(stdout.startsWith('hello'));
82 // Same output from all three process runs. 90 // Same output from all three process runs.
83 for (int i = 0; i < results.length; i++) { 91 for (int i = 0; i < results.length; i++) {
84 Expect.equals(stdout, results[i].stdout); 92 Expect.equals(stdout, results[i].stdout);
85 } 93 }
86 } 94 }
87 95
88 main() { 96 main() {
89 HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 0).then(serverRunning); 97 HttpServer.bind(InternetAddress.LOOPBACK_IP_V4, 0).then(serverRunning);
90 } 98 }
OLDNEW
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698