OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <body> |
| 3 |
| 4 <script> |
| 5 if (window.testRunner) { |
| 6 window.testRunner.dumpAsText(); |
| 7 window.testRunner.waitUntilDone(); |
| 8 } |
| 9 </script> |
| 10 |
| 11 <div id="dart"> |
| 12 import 'dart:js'; |
| 13 |
| 14 void main() { |
| 15 print("Hello World"); |
| 16 context['testRunner'].callMethod('notifyDone', []); |
| 17 } |
| 18 </div> |
| 19 |
| 20 <script type="application/dart"> |
| 21 import 'dart:html'; |
| 22 import 'dart:isolate'; |
| 23 import 'dart:js'; |
| 24 |
| 25 void main() { |
| 26 var code = querySelector('#dart'); |
| 27 var dataUri = 'data:application/dart;base64,${window.btoa(code.text)}'; |
| 28 // TODO(17738): Expand this test to validate parameters are passed and |
| 29 // the correct future is returned. |
| 30 try { |
| 31 Future<Isolate> isolate = spawnDomUri(Uri.parse(dataUri), [], null); |
| 32 } catch (e) { |
| 33 print("Spawn failed: $e"); |
| 34 context['testRunner'].callMethod('notifyDone', []); |
| 35 } |
| 36 code.remove(); |
| 37 } |
| 38 </script> |
| 39 |
| 40 </body> |
| 41 </html> |
OLD | NEW |