Chromium Code Reviews| 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..a0d087c9f9336d55db532fcd9bb42a99f47dbd79 100644 |
| --- a/LayoutTests/fast/dom/custom/registration-context-sharing.html |
| +++ b/LayoutTests/fast/dom/custom/registration-context-sharing.html |
| @@ -146,28 +146,18 @@ t.step(function () { |
| link = documentA.createElement('link'); |
| link.rel = 'import'; |
| link.href = 'resources/empty-document.html'; |
| + link.onload = function() { |
| + t.step(function () { |
|
dominicc (has gone to gerrit)
2013/09/10 23:06:30
You can use step_func for this.
|
| + var documentB = link.import; |
| + var tester = new TestRegistrationContextSharing(window, |
| + documentA, documentB); |
| + tester.testRegistrationContextIsShared(); |
| + t.done(); |
| + }); |
| + }; |
| 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 () { |
| - var documentB = link.import; |
| - var tester = new TestRegistrationContextSharing(window, |
| - documentA, documentB); |
| - tester.testRegistrationContextIsShared(); |
| - t.done(); |
| - }); |
| -} |
| - |
| })(); |
| </script> |