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

Unified Diff: LayoutTests/fast/js/resources/js-test-pre.js

Issue 54473004: Make js-test-post a noop. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add mac NeedsRebaselines 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
Index: LayoutTests/fast/js/resources/js-test-pre.js
diff --git a/LayoutTests/fast/js/resources/js-test-pre.js b/LayoutTests/fast/js/resources/js-test-pre.js
index bb127d411d0b97231507c15c4e2246c1913618c9..6e578d5e6372b8e7504823684e1c674f6f11e984 100644
--- a/LayoutTests/fast/js/resources/js-test-pre.js
+++ b/LayoutTests/fast/js/resources/js-test-pre.js
@@ -73,8 +73,23 @@ var description, debug, successfullyParsed, errorMessage;
(document.head || document.documentElement).appendChild(styleElement);
}
- if (!isWorker())
+ function handleTestFinished()
+ {
+ // FIXME: Get rid of this boolean.
+ wasPostTestScriptParsed = true;
+ if (window.jsTestIsAsync) {
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+ if (window.wasFinishJSTestCalled)
+ finishJSTest();
+ } else
+ finishJSTest();
+ }
+
+ if (!isWorker()) {
+ window.addEventListener('DOMContentLoaded', handleTestFinished, false);
insertStyleSheet();
+ }
if (!self.isOnErrorTest) {
self.onerror = function(message)
@@ -82,7 +97,6 @@ var description, debug, successfullyParsed, errorMessage;
errorMessage = message;
};
}
-
})();
function isWorker()

Powered by Google App Engine
This is Rietveld 408576698