Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: LayoutTests/fast/dom/HTMLHeadElement/head-link-style-href-check.html

Issue 561813003: Prepare blink to unify definitions of load completion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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;
25 26
26 var oLink = document.createElement('link'); 27 var oLink = document.createElement('link');
27 28
28 oLink.setAttribute('rel', 'stylesheet'); 29 oLink.setAttribute('rel', 'stylesheet');
29 oLink.setAttribute('type', 'text/css'); 30 oLink.setAttribute('type', 'text/css');
30 oLink.setAttribute('media', 'screen'); 31 oLink.setAttribute('media', 'screen');
31 oLink.setAttribute('href','about:blank;'); 32 oLink.setAttribute('href','about:blank;');
32 33
33 oHead.appendChild(oLink); 34 oHead.appendChild(oLink);
34 35
35 oLink.setAttribute('href','about:blank;'); 36 oLink.setAttribute('href','about:blank;');
36 37
37 setTimeout(moveDiv(oElm), 1000); 38 setTimeout(moveDiv(oElm), 1000);
38 39
39 if (window.testRunner) { 40 if (window.testRunner) {
40 testRunner.notifyDone(); 41 testRunner.notifyDone();
41 } 42 }
42 } 43 }
43 </script> 44 </script>
44 </head> 45 </head>
45 <body onload="createAndAppend();"> 46 <body onload="createAndAppend();">
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> 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>
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> 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>
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> 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>
49 </body> 50 </body>
50 </html> 51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698