| 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 part of test_suite; | 5 part of test_suite; |
| 6 | 6 |
| 7 String getHtmlContents(String title, | 7 String getHtmlContents(String title, |
| 8 String scriptType, | 8 String scriptType, |
| 9 Path sourceScript) { | 9 Path sourceScript) { |
| 10 return """ | 10 return """ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 <h1> Running $title </h1> | 25 <h1> Running $title </h1> |
| 26 <script type="text/javascript" | 26 <script type="text/javascript" |
| 27 src="/root_dart/tools/testing/dart/test_controller.js"> | 27 src="/root_dart/tools/testing/dart/test_controller.js"> |
| 28 </script> | 28 </script> |
| 29 <script type="$scriptType" src="$sourceScript" | 29 <script type="$scriptType" src="$sourceScript" |
| 30 onerror="scriptTagOnErrorCallback(null)" | 30 onerror="scriptTagOnErrorCallback(null)" |
| 31 defer> | 31 defer> |
| 32 </script> | 32 </script> |
| 33 <script type="text/javascript" | 33 <script type="text/javascript" |
| 34 src="/root_dart/pkg/browser/lib/dart.js"></script> | 34 src="/root_dart/pkg/browser/lib/dart.js"></script> |
| 35 <script type="text/javascript" | |
| 36 src="/root_dart/pkg/browser/lib/interop.js"></script> | |
| 37 </body> | 35 </body> |
| 38 </html>"""; | 36 </html>"""; |
| 39 } | 37 } |
| 40 | 38 |
| 41 String dartTestWrapper(String libraryPathComponent) { | 39 String dartTestWrapper(String libraryPathComponent) { |
| 42 return """ | 40 return """ |
| 43 import '$libraryPathComponent' as test; | 41 import '$libraryPathComponent' as test; |
| 44 | 42 |
| 45 main() { | 43 main() { |
| 46 print("dart-calling-main"); | 44 print("dart-calling-main"); |
| 47 test.main(); | 45 test.main(); |
| 48 print("dart-main-done"); | 46 print("dart-main-done"); |
| 49 } | 47 } |
| 50 """; | 48 """; |
| 51 } | 49 } |
| OLD | NEW |