OLD | NEW |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | 2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > | 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" > |
4 <head> | 4 <head> |
5 <script type="text/javascript"> | 5 <script type="text/javascript"> |
6 | 6 |
7 function moveDiv(dv) { | 7 function moveDiv(dv) { |
8 dv.style.left = '100px'; | 8 dv.style.left = '100px'; |
9 dv.style.top = '100px'; | 9 dv.style.top = '100px'; |
10 } | 10 } |
11 | 11 |
12 var oHead = document.getElementsByTagName('head')[0]; | 12 var oHead = document.getElementsByTagName('head')[0]; |
13 | 13 |
14 function createAndAppend() { | 14 function createAndAppend() { |
15 if (window.testRunner) { | 15 if (window.testRunner) { |
16 testRunner.waitUntilDone(); | 16 testRunner.waitUntilDone(); |
17 } | 17 } |
18 | 18 |
19 var oElm = document.createElement('div') | 19 var oElm = document.createElement('div') |
20 oElm.style.background = '#FCF'; | 20 oElm.style.background = '#FCF'; |
21 oElm.style.width = '100px'; | 21 oElm.style.width = '100px'; |
22 oElm.style.height = '100px'; | 22 oElm.style.height = '100px'; |
23 | 23 |
24 document.body.appendChild(oElm); | 24 document.body.appendChild(oElm); |
25 document.body.offsetLeft; | |
26 | 25 |
27 var oLink = document.createElement('link'); | 26 var oLink = document.createElement('link'); |
28 | 27 |
29 oLink.setAttribute('rel', 'stylesheet'); | 28 oLink.setAttribute('rel', 'stylesheet'); |
30 oLink.setAttribute('type', 'text/css'); | 29 oLink.setAttribute('type', 'text/css'); |
31 oLink.setAttribute('media', 'screen'); | 30 oLink.setAttribute('media', 'screen'); |
32 oLink.setAttribute('href','about:blank;'); | 31 oLink.setAttribute('href','about:blank;'); |
33 | 32 |
34 oHead.appendChild(oLink); | 33 oHead.appendChild(oLink); |
35 | 34 |
36 oLink.setAttribute('href','about:blank;'); | 35 oLink.setAttribute('href','about:blank;'); |
37 | 36 |
38 setTimeout(moveDiv(oElm), 1000); | 37 setTimeout(moveDiv(oElm), 1000); |
39 | 38 |
40 if (window.testRunner) { | 39 if (window.testRunner) { |
41 testRunner.notifyDone(); | 40 testRunner.notifyDone(); |
42 } | 41 } |
43 } | 42 } |
44 </script> | 43 </script> |
45 </head> | 44 </head> |
46 <body onload="createAndAppend();"> | 45 <body onload="createAndAppend();"> |
47 <p>This is a test to check if the loading of a stylesheet is properly cancelled
(count of pending style sheets is decremented) when its link tag is changed thro
ugh the DOM after the link tag is appended to the document. When the div with s
tyle is moved, it appears on the screen if the style was loaded properly, and do
esn't appear when there are out-standing stylesheets according to the DocLoader.
See <a href="https://bugs.webkit.org/show_bug.cgi?id=6999">6999</a></p> | 46 <p>This is a test to check if the loading of a stylesheet is properly cancelled
(count of pending style sheets is decremented) when its link tag is changed thro
ugh the DOM after the link tag is appended to the document. When the div with s
tyle is moved, it appears on the screen if the style was loaded properly, and do
esn't appear when there are out-standing stylesheets according to the DocLoader.
See <a href="https://bugs.webkit.org/show_bug.cgi?id=6999">6999</a></p> |
48 <p><span style="color: red; font-weight: bold;">Fails</span> if there <span styl
e="color: red; font-weight: bold;">is no</span> pink box on the screen.</p> | 47 <p><span style="color: red; font-weight: bold;">Fails</span> if there <span styl
e="color: red; font-weight: bold;">is no</span> pink box on the screen.</p> |
49 <p><span style="color: green; font-weight: bold;">Passes</span> if there <span s
tyle="color: green; font-weight: bold;">is</span> a pink box on the screen.</p> | 48 <p><span style="color: green; font-weight: bold;">Passes</span> if there <span s
tyle="color: green; font-weight: bold;">is</span> a pink box on the screen.</p> |
50 </body> | 49 </body> |
51 </html> | 50 </html> |
OLD | NEW |