| 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 </script> | 31 </script> |
| 30 <script type="text/javascript" | 32 <script type="text/javascript" |
| 31 src="/root_dart/pkg/browser/lib/dart.js"></script> | 33 src="/root_dart/pkg/browser/lib/dart.js"></script> |
| 32 <script type="text/javascript" | 34 <script type="text/javascript" |
| 33 src="/root_dart/pkg/browser/lib/interop.js"></script> | 35 src="/root_dart/pkg/browser/lib/interop.js"></script> |
| 34 </body> | 36 </body> |
| 35 </html> | 37 </html> |
| 36 """; | 38 """; |
| 37 | 39 |
| 38 String getHtmlLayoutContents(String scriptType, Path sourceScript) => | 40 String getHtmlLayoutContents(String scriptType, |
| 41 Path sourceScript, |
| 42 bool fancyStacks) => |
| 39 """ | 43 """ |
| 40 <!DOCTYPE html> | 44 <!DOCTYPE html> |
| 41 <html> | 45 <html> |
| 42 <head> | 46 <head> |
| 43 <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 47 <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 48 ${fancyStacks?'':'<meta name="dart.unittest" content="raw-stack-traces">'} |
| 44 </head> | 49 </head> |
| 45 <body> | 50 <body> |
| 46 <script type="text/javascript"> | 51 <script type="text/javascript"> |
| 47 if (navigator.webkitStartDart) navigator.webkitStartDart(); | 52 if (navigator.webkitStartDart) navigator.webkitStartDart(); |
| 48 </script> | 53 </script> |
| 49 <script type="$scriptType" src="$sourceScript"></script> | 54 <script type="$scriptType" src="$sourceScript"></script> |
| 50 </body> | 55 </body> |
| 51 </html> | 56 </html> |
| 52 """; | 57 """; |
| 53 | 58 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 66 import '$unitTest/unittest.dart' as unittest; | 71 import '$unitTest/unittest.dart' as unittest; |
| 67 import '$unitTest/html_config.dart' as config; | 72 import '$unitTest/html_config.dart' as config; |
| 68 import '$libraryPathComponent' as Test; | 73 import '$libraryPathComponent' as Test; |
| 69 | 74 |
| 70 main() { | 75 main() { |
| 71 config.useHtmlConfiguration(); | 76 config.useHtmlConfiguration(); |
| 72 unittest.group('', Test.main); | 77 unittest.group('', Test.main); |
| 73 } | 78 } |
| 74 """; | 79 """; |
| 75 } | 80 } |
| OLD | NEW |