Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: dart/tools/testing/dart/browser_test.dart

Issue 36913002: test.py: Sending JSON between test_controller.js <-> browser_controller (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/tools/testing/dart/browser_controller.dart ('k') | dart/tools/testing/dart/test_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
}
""";
-}
+}
« no previous file with comments | « dart/tools/testing/dart/browser_controller.dart ('k') | dart/tools/testing/dart/test_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698