| 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 """ | 10 """ |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 defer> | 30 defer> |
| 31 </script> | 31 </script> |
| 32 <script type="text/javascript" | 32 <script type="text/javascript" |
| 33 src="/root_dart/pkg/browser/lib/dart.js"></script> | 33 src="/root_dart/pkg/browser/lib/dart.js"></script> |
| 34 <script type="text/javascript" | 34 <script type="text/javascript" |
| 35 src="/root_dart/pkg/browser/lib/interop.js"></script> | 35 src="/root_dart/pkg/browser/lib/interop.js"></script> |
| 36 </body> | 36 </body> |
| 37 </html> | 37 </html> |
| 38 """; | 38 """; |
| 39 | 39 |
| 40 String getHtmlLayoutContents(String scriptType, | |
| 41 Path sourceScript) => | |
| 42 """ | |
| 43 <!DOCTYPE html> | |
| 44 <html> | |
| 45 <head> | |
| 46 <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| 47 <meta name="dart.unittest" content="full-stack-traces"> | |
| 48 </head> | |
| 49 <body> | |
| 50 <script type="text/javascript"> | |
| 51 if (navigator.webkitStartDart) navigator.webkitStartDart(); | |
| 52 </script> | |
| 53 <script type="$scriptType" src="$sourceScript" defer></script> | |
| 54 </body> | |
| 55 </html> | |
| 56 """; | |
| 57 | |
| 58 String dartTestWrapper(String libraryPathComponent) { | 40 String dartTestWrapper(String libraryPathComponent) { |
| 59 return """ | 41 return """ |
| 60 import '$libraryPathComponent' as test; | 42 import '$libraryPathComponent' as test; |
| 61 | 43 |
| 62 main() { | 44 main() { |
| 63 print("dart-calling-main"); | 45 print("dart-calling-main"); |
| 64 test.main(); | 46 test.main(); |
| 65 print("dart-main-done"); | 47 print("dart-main-done"); |
| 66 } | 48 } |
| 67 """; | 49 """; |
| 68 } | 50 } |
| OLD | NEW |