Index: tools/testing/dart/browser_test.dart |
diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart |
index dbfd7e529635ab9207ff68126975ece86e7df5f8..e37d029a3ce0b970ad7a5cb64d4cfe0a657c2cfc 100644 |
--- a/tools/testing/dart/browser_test.dart |
+++ b/tools/testing/dart/browser_test.dart |
@@ -55,7 +55,7 @@ String getHtmlLayoutContents(String scriptType, |
</html> |
"""; |
-String dartTestWrapper(bool usePackageImport, String libraryPathComponent) { |
+String dartUnittestWrapper(bool usePackageImport, String libraryPathComponent) { |
// Tests inside "pkg" import unittest using "package:". All others use a |
// relative path. The imports need to agree, so use a matching form here. |
var unitTest; |
@@ -77,3 +77,15 @@ main() { |
} |
"""; |
} |
+ |
+String dartTestWrapper(String libraryPathComponent) { |
+ return """ |
+import '$libraryPathComponent' as test; |
+ |
+main() { |
+ print("dart-calling-main"); |
+ test.main(); |
+ print("dart-main-done"); |
+} |
+"""; |
+} |