Chromium Code Reviews| Index: dart/tools/testing/dart/browser_test.dart |
| diff --git a/dart/tools/testing/dart/browser_test.dart b/dart/tools/testing/dart/browser_test.dart |
| index 5d49a0a2ccf8f449c7765bc7c4b8670a010b5234..310e5a7deb668b038e3cb6fcc65a2b131bf02248 100644 |
| --- a/dart/tools/testing/dart/browser_test.dart |
| +++ b/dart/tools/testing/dart/browser_test.dart |
| @@ -6,8 +6,13 @@ part of test_suite; |
| String getHtmlContents(String title, |
| String scriptType, |
| - Path sourceScript) => |
| -""" |
| + Path sourceScript, |
| + {bool use_unittest_controller: false}) { |
| + var testControllerJs = '/root_dart/tools/testing/dart/test_controller.js'; |
| + if (use_unittest_controller) { |
| + testControllerJs = '/root_dart/pkg/unittest/lib/test_controller.js'; |
| + } |
| + return """ |
| <!DOCTYPE html> |
| <html> |
| <head> |
| @@ -24,9 +29,9 @@ String getHtmlContents(String title, |
| <body> |
| <h1> Running $title </h1> |
| <script type="text/javascript" |
| - src="/root_dart/pkg/unittest/lib/test_controller.js"> |
| + src="$testControllerJs"> |
| </script> |
| - <script type="$scriptType" src="$sourceScript" onerror="externalError(null)" |
| + <script type="$scriptType" src="$sourceScript" onerror="scriptTagOnErrorCallback(null)" |
| defer> |
| </script> |
| <script type="text/javascript" |
| @@ -34,8 +39,8 @@ String getHtmlContents(String title, |
| <script type="text/javascript" |
| src="/root_dart/pkg/browser/lib/interop.js"></script> |
| </body> |
| -</html> |
| -"""; |
| +</html>"""; |
| +} |
| String dartTestWrapper(String libraryPathComponent) { |
| return """ |
| @@ -47,4 +52,4 @@ main() { |
| print("dart-main-done"); |
| } |
| """; |
| -} |
| +} |
|
Bill Hesse
2013/11/15 11:24:03
I hope this is adding a \n, not removing one.
kustermann
2013/11/19 10:06:10
I hope so as well :)
|