OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 | 4 |
5 // The following set of variables should be set by the caller that | 5 // The following set of variables should be set by the caller that |
6 // #sources this file. | 6 // #sources this file. |
7 /** Whether to include elapsed time. */ | 7 /** Whether to include elapsed time. */ |
8 | 8 |
9 part of test_controller; | 9 part of test_controller; |
10 | 10 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 225 } |
226 }; | 226 }; |
227 stdoutStream.onError = (e) { | 227 stdoutStream.onError = (e) { |
228 print(e); | 228 print(e); |
229 }; | 229 }; |
230 process.onExit = (exitCode) { | 230 process.onExit = (exitCode) { |
231 stdout.addAll(process.stdout.read()); | 231 stdout.addAll(process.stdout.read()); |
232 process.close(); | 232 process.close(); |
233 var labelMarker = 'CONSOLE MESSAGE: #TEST '; | 233 var labelMarker = 'CONSOLE MESSAGE: #TEST '; |
234 var contentMarker = 'Content-Length: '; | 234 var contentMarker = 'Content-Length: '; |
235 var eol = '\n'.charCodeAt(0); | 235 var eol = '\n'.codeUnitAt(0); |
236 var pos = -1; | 236 var pos = -1; |
237 var label = null; | 237 var label = null; |
238 var done = false; | 238 var done = false; |
239 | 239 |
240 while(pos < stdout.length) { | 240 while(pos < stdout.length) { |
241 var idx = stdout.indexOf(eol, ++pos); | 241 var idx = stdout.indexOf(eol, ++pos); |
242 if (idx < 0) break; | 242 if (idx < 0) break; |
243 StringBuffer sb = new StringBuffer(); | 243 StringBuffer sb = new StringBuffer(); |
244 for (var i = pos; i < idx; i++) { | 244 for (var i = pos; i < idx; i++) { |
245 sb.addCharCode(stdout[i]); | 245 sb.addCharCode(stdout[i]); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 | 313 |
314 void runPixelLayoutTests() { | 314 void runPixelLayoutTests() { |
315 init(); | 315 init(); |
316 runPixelLayoutTest(0); | 316 runPixelLayoutTest(0); |
317 } | 317 } |
318 | 318 |
319 void runTextLayoutTests() { | 319 void runTextLayoutTests() { |
320 init(); | 320 init(); |
321 runTextLayoutTest(0); | 321 runTextLayoutTest(0); |
322 } | 322 } |
OLD | NEW |