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 default pipeline code for running a test file. */ | 5 /** The default pipeline code for running a test file. */ |
6 library pipeline; | 6 library pipeline; |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
10 import 'dart:math'; | 10 import 'dart:math'; |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 if (testRunner) { | 284 if (testRunner) { |
285 function handleMessage(m) { | 285 function handleMessage(m) { |
286 if (m.data == 'done') { | 286 if (m.data == 'done') { |
287 testRunner.notifyDone(); | 287 testRunner.notifyDone(); |
288 } | 288 } |
289 } | 289 } |
290 testRunner.waitUntilDone(); | 290 testRunner.waitUntilDone(); |
291 $runAsText | 291 $runAsText |
292 window.addEventListener("message", handleMessage, false); | 292 window.addEventListener("message", handleMessage, false); |
293 } | 293 } |
294 if (!$isJavascript && navigator.webkitStartDart) { | |
295 navigator.webkitStartDart(); | |
296 } | |
297 </script> | 294 </script> |
298 </head> | 295 </head> |
299 <body> | 296 <body> |
300 $bodyElements | 297 $bodyElements |
301 <script type='$scriptType' src='$scriptFile'></script> | 298 <script type='$scriptType' src='$scriptFile'></script> |
302 </script> | 299 </script> |
303 </body> | 300 </body> |
304 </html> | 301 </html> |
305 '''); | 302 '''); |
306 } | 303 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 cleanup(tempHtmlFile); | 355 cleanup(tempHtmlFile); |
359 cleanup(tempJsFile); | 356 cleanup(tempJsFile); |
360 cleanup(tempChildDartFile); | 357 cleanup(tempChildDartFile); |
361 cleanup(tempChildJsFile); | 358 cleanup(tempChildJsFile); |
362 cleanup(createTempName(tmpDir, "pubspec", "yaml")); | 359 cleanup(createTempName(tmpDir, "pubspec", "yaml")); |
363 cleanup(createTempName(tmpDir, "pubspec", "lock")); | 360 cleanup(createTempName(tmpDir, "pubspec", "lock")); |
364 cleanupDir(createTempName(tmpDir, "packages")); | 361 cleanupDir(createTempName(tmpDir, "packages")); |
365 } | 362 } |
366 completePipeline(stdout, stderr, exitcode); | 363 completePipeline(stdout, stderr, exitcode); |
367 } | 364 } |
OLD | NEW |