| 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 bool fancyStacks) => |
| 10 """ | 11 """ |
| 11 <!DOCTYPE html> | 12 <!DOCTYPE html> |
| 12 <html> | 13 <html> |
| 13 <head> | 14 <head> |
| 14 <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 15 <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 16 ${fancyStacks?'':'<meta name="dart.unittest" content="raw-stack-traces">'} |
| 15 <title> Test $title </title> | 17 <title> Test $title </title> |
| 16 <style> | 18 <style> |
| 17 .unittest-table { font-family:monospace; border:1px; } | 19 .unittest-table { font-family:monospace; border:1px; } |
| 18 .unittest-pass { background: #6b3;} | 20 .unittest-pass { background: #6b3;} |
| 19 .unittest-fail { background: #d55;} | 21 .unittest-fail { background: #d55;} |
| 20 .unittest-error { background: #a11;} | 22 .unittest-error { background: #a11;} |
| 21 </style> | 23 </style> |
| 22 </head> | 24 </head> |
| 23 <body> | 25 <body> |
| 24 <h1> Running $title </h1> | 26 <h1> Running $title </h1> |
| 25 <script type="text/javascript" | 27 <script type="text/javascript" |
| 26 src="/root_dart/pkg/unittest/lib/test_controller.js"> | 28 src="/root_dart/pkg/unittest/lib/test_controller.js"> |
| 27 </script> | 29 </script> |
| 28 <script type="$scriptType" src="$sourceScript" onerror="externalError(null)" | 30 <script type="$scriptType" src="$sourceScript" onerror="externalError(null)" |
| 29 defer> | 31 defer> |
| 30 </script> | 32 </script> |
| 31 <script type="text/javascript" | 33 <script type="text/javascript" |
| 32 src="/root_dart/pkg/browser/lib/dart.js"></script> | 34 src="/root_dart/pkg/browser/lib/dart.js"></script> |
| 33 <script type="text/javascript" | 35 <script type="text/javascript" |
| 34 src="/root_dart/pkg/browser/lib/interop.js"></script> | 36 src="/root_dart/pkg/browser/lib/interop.js"></script> |
| 35 </body> | 37 </body> |
| 36 </html> | 38 </html> |
| 37 """; | 39 """; |
| 38 | 40 |
| 39 String getHtmlLayoutContents(String scriptType, Path sourceScript) => | 41 String getHtmlLayoutContents(String scriptType, |
| 42 Path sourceScript, |
| 43 bool fancyStacks) => |
| 40 """ | 44 """ |
| 41 <!DOCTYPE html> | 45 <!DOCTYPE html> |
| 42 <html> | 46 <html> |
| 43 <head> | 47 <head> |
| 44 <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 48 <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 49 ${fancyStacks?'':'<meta name="dart.unittest" content="raw-stack-traces">'} |
| 45 </head> | 50 </head> |
| 46 <body> | 51 <body> |
| 47 <script type="text/javascript"> | 52 <script type="text/javascript"> |
| 48 if (navigator.webkitStartDart) navigator.webkitStartDart(); | 53 if (navigator.webkitStartDart) navigator.webkitStartDart(); |
| 49 </script> | 54 </script> |
| 50 <script type="$scriptType" src="$sourceScript" defer></script> | 55 <script type="$scriptType" src="$sourceScript" defer></script> |
| 51 </body> | 56 </body> |
| 52 </html> | 57 </html> |
| 53 """; | 58 """; |
| 54 | 59 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 67 import '$unitTest/unittest.dart' as unittest; | 72 import '$unitTest/unittest.dart' as unittest; |
| 68 import '$unitTest/html_config.dart' as config; | 73 import '$unitTest/html_config.dart' as config; |
| 69 import '$libraryPathComponent' as Test; | 74 import '$libraryPathComponent' as Test; |
| 70 | 75 |
| 71 main() { | 76 main() { |
| 72 config.useHtmlConfiguration(); | 77 config.useHtmlConfiguration(); |
| 73 unittest.group('', Test.main); | 78 unittest.group('', Test.main); |
| 74 } | 79 } |
| 75 """; | 80 """; |
| 76 } | 81 } |
| OLD | NEW |