OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 import 'utils.dart'; | 5 import 'utils.dart'; |
6 | 6 |
7 String dart2jsHtml(String title, String scriptPath) { | 7 String dart2jsHtml(String title, String scriptPath) { |
8 return """ | 8 return """ |
9 <!DOCTYPE html> | 9 <!DOCTYPE html> |
10 <html> | 10 <html> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Don't try to bring up the debugger on a runtime error. | 77 // Don't try to bring up the debugger on a runtime error. |
78 window.ddcSettings = { | 78 window.ddcSettings = { |
79 trapRuntimeErrors: false | 79 trapRuntimeErrors: false |
80 }; | 80 }; |
81 </script> | 81 </script> |
82 <script type="text/javascript" | 82 <script type="text/javascript" |
83 src="/root_dart/third_party/requirejs/require.js"></script> | 83 src="/root_dart/third_party/requirejs/require.js"></script> |
84 <script type="text/javascript"> | 84 <script type="text/javascript"> |
85 requirejs(["$testName", "dart_sdk", "async_helper"], | 85 requirejs(["$testName", "dart_sdk", "async_helper"], |
86 function($testName, dart_sdk, async_helper) { | 86 function($testName, dart_sdk, async_helper) { |
87 function finish() { | 87 dart_sdk.dart.ignoreWhitelistedErrors(false); |
88 // dev_compiler's test runner (language_test.js) uses this to notify the | |
89 // test results, but it isn't needed for test.dart. | |
90 } | |
91 | 88 |
92 // TODO(rnystrom): This uses DDC's forked version of async_helper. Unfork | 89 // TODO(rnystrom): This uses DDC's forked version of async_helper. Unfork |
93 // these packages when possible. | 90 // these packages when possible. |
94 async_helper.async_helper.asyncTestInitialize(finish); | 91 async_helper.async_helper.asyncTestInitialize(function() {}); |
95 | |
96 dart_sdk._isolate_helper.startRootIsolate(function() {}, []); | 92 dart_sdk._isolate_helper.startRootIsolate(function() {}, []); |
97 dartMainRunner($testName.$testName.main); | 93 dartMainRunner($testName.$testName.main); |
98 }); | 94 }); |
99 </script> | 95 </script> |
100 </body> | 96 </body> |
101 </html> | 97 </html> |
102 """; | 98 """; |
103 } | 99 } |
OLD | NEW |