Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / html / imports / rel-import-to-style.html
index a26540f..db91616 100644 (file)
@@ -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>