OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="../../js/resources/js-test-pre.js"></script> | |
5 <link id="target", rel="stylesheet" href="old.css"> | |
haraken
2013/07/09 05:44:28
Nit: ',' is unnecessary.
| |
6 </head> | |
7 <body> | |
8 <script><!-- | |
haraken
2013/07/09 05:44:28
<!-- is unnecessary.
| |
9 description('This tests that ownerNode of orphan sheet is null.'); | |
10 | |
11 jsTestIsAsync = true; | |
12 | |
13 window.onload = function() | |
14 { | |
15 oldSheet = target.sheet; | |
16 target.setAttribute("href", "new.css"); | |
17 | |
18 function waitAndTest() { | |
19 if (0 <= target.sheet.href.indexOf("old.css")) | |
20 return window.setTimeout(waitAndTest, 0); | |
21 shouldBeNull("oldSheet.ownerNode"); | |
22 if (oldSheet.ownerNode) | |
23 return finishJSTest(); | |
24 // We need to exercise cached case as well, which can be executed with a reload. | |
25 if (0 <= window.location.toString().indexOf("?reloaded")) | |
26 return finishJSTest(); | |
27 window.location = window.location.toString() + "?reloaded"; | |
28 }; | |
29 | |
30 window.setTimeout(waitAndTest, 0); | |
31 }; | |
32 | |
33 --></script> | |
34 <script src="../../js/resources/js-test-post.js"></script> | |
35 </body> | |
36 </html> | |
OLD | NEW |