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

Unified Diff: pkg/unittest/lib/test_controller.js

Issue 23539003: Turn on Polymer TodoMVC tests on Dart buildbots (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 4 months 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 | « pkg/polymer/test/run_all.dart ('k') | samples/samples.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/test_controller.js
diff --git a/pkg/unittest/lib/test_controller.js b/pkg/unittest/lib/test_controller.js
index 439b7033aea8b4d4a097ec61f907ad8848ba0cc4..d9be055b61ee58c6587dcafac7b5009839731908 100644
--- a/pkg/unittest/lib/test_controller.js
+++ b/pkg/unittest/lib/test_controller.js
@@ -23,7 +23,15 @@ window.onerror = function (message, url, lineNumber) {
window.postMessage('unittest-suite-external-error', '*');
};
-if (navigator.webkitStartDart) {
+// Start Dartium/content_shell, unless we are waiting for HTML Imports to load.
+// HTML Imports allows a document to link to other HTMLs documents via
+// <link rel=import>. It also allows for those other documents to contain
+// <script> tags, which must be run before scripts on the main page.
+// We have package:html_import to polyfill this feature, and it will handle
+// starting Dartium/content_shell in that case. HTML Imports is used by Polymer,
+// but it could be used by itself too. See the specification:
+// https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/imports/index.html
+if (navigator.webkitStartDart && !window.HTMLImports) {
navigator.webkitStartDart();
}
« no previous file with comments | « pkg/polymer/test/run_all.dart ('k') | samples/samples.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698