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

Unified Diff: LayoutTests/fast/dom/custom/registration-context-sharing.html

Issue 23903029: [HTML Imports] Employ load/error events to stabilize polling-based tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 3 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 | « no previous file | LayoutTests/http/tests/htmlimports/import-script-block-crossorigin-dynamic.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/custom/registration-context-sharing.html
diff --git a/LayoutTests/fast/dom/custom/registration-context-sharing.html b/LayoutTests/fast/dom/custom/registration-context-sharing.html
index e843176c15da1a27b3b1989a8759e03fc7b9820c..47d5b0ad11d23e6290a120aea8e1f3a8acd5071d 100644
--- a/LayoutTests/fast/dom/custom/registration-context-sharing.html
+++ b/LayoutTests/fast/dom/custom/registration-context-sharing.html
@@ -146,27 +146,16 @@ t.step(function () {
link = documentA.createElement('link');
link.rel = 'import';
link.href = 'resources/empty-document.html';
- documentA.head.appendChild(link);
-
- // FIXME: When imports raise the 'load' event, use that instead of
- // polling.
- waitForLinkToLoad();
-});
-
-function waitForLinkToLoad() {
- if (!link.import) {
- setTimeout(waitForLinkToLoad, 100);
- return;
- }
-
- t.step(function () {
+ link.onload = t.step_func(function () {
var documentB = link.import;
var tester = new TestRegistrationContextSharing(window,
documentA, documentB);
tester.testRegistrationContextIsShared();
t.done();
});
-}
+
+ documentA.head.appendChild(link);
+});
})();
« no previous file with comments | « no previous file | LayoutTests/http/tests/htmlimports/import-script-block-crossorigin-dynamic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698