Index: LayoutTests/fast/html/imports/rel-import-to-style.html |
diff --git a/LayoutTests/fast/html/imports/rel-import-to-style.html b/LayoutTests/fast/html/imports/rel-import-to-style.html |
index a26540f76d74aba61654f8d21eaeb80e3e5d1e12..db9161681b2b984ef34caef2f9722b44766deb7f 100644 |
--- a/LayoutTests/fast/html/imports/rel-import-to-style.html |
+++ b/LayoutTests/fast/html/imports/rel-import-to-style.html |
@@ -7,27 +7,22 @@ |
</head> |
<body> |
<script> |
-waitAndTest([ |
- { |
- description: "Updating attribute value shouldn't invalidate loaded import.", |
- setup: function() |
- { |
- debug("Before update:"); |
- shouldBeNull("target.sheet"); |
- shouldBeNonNull("target.import"); |
- target.setAttribute("href", "resources/hello.css"); |
- target.setAttribute("rel", "stylesheet"); |
- window.placeholder = createPlaceholder(); |
- }, |
- ready: function() { return window.placeholder.import; }, |
- test: function() |
- { |
- debug("After update:"); |
- shouldBeNull("target.sheet"); |
- shouldBeNonNull("target.import"); |
- } |
+window.jsTestIsAsync = true; |
+description('Updating attribute value shouldn\'t invalidate loaded import.'); |
+(function() { |
+ debug('Before update:'); |
+ shouldBeNull('target.sheet'); |
+ shouldBeNonNull('target.import'); |
+ target.setAttribute('href', 'resources/hello.css'); |
+ target.setAttribute('rel', 'stylesheet'); |
+ window.placeholder = createPlaceholder(); |
+ window.placeholder.onload = function() { |
+ debug('After update:'); |
+ shouldBeNull('target.sheet'); |
+ shouldBeNonNull('target.import'); |
+ window.addEventListener('load', function() { requestAnimationFrame(finishJSTest); }); |
} |
-]); |
+})(); |
</script> |
</body> |
</html> |