| 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..fa3c48b8ce809bb5afea2f743096302da81156b1 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,10 @@ 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 +40,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 +53,4 @@ main() {
|
| print("dart-main-done");
|
| }
|
| """;
|
| -}
|
| +}
|
|
|