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

Side by Side Diff: LayoutTests/http/tests/misc/SVGFont-delayed-load.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 <p>This tests that the onload handler for an iframe is delayed by a pending SVGF ont load.</p> 1 <p>This tests that the onload handler for an iframe is delayed by a pending SVGF ont load.</p>
2 <pre id="console"></pre> 2 <pre id="console"></pre>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 6
7 function log(msg) 7 function log(msg)
8 { 8 {
9 document.getElementById('console').appendChild(document.createTextNode(m sg + "\n")); 9 document.getElementById('console').appendChild(document.createTextNode(m sg + "\n"));
10 } 10 }
11 11
12 var onloadFired = false; 12 var onloadFired = false;
13 13
14 iframe = document.createElement('iframe'); 14 iframe = document.createElement('iframe');
15 iframe.onload = function() { 15 iframe.onload = function() {
16 onloadFired = true; 16 onloadFired = true;
17 }; 17 };
18 iframe.src = "resources/SVGFont-delayed-loader.svg"; 18 iframe.src = "resources/SVGFont-delayed-loader.svg";
19 document.body.appendChild(iframe); 19 document.body.appendChild(iframe);
20 20
21 function contentLoaded() 21 function contentLoaded()
22 { 22 {
23 if (onloadFired) 23 if (onloadFired)
24 log("FAIL: the onload event fired before the SVGFont load finished") ; 24 log("FAIL: the onload event fired before the SVGFont load finished") ;
25 else 25 else
26 log("PASS: the onload event did not fire."); 26 log("PASS: the onload event did not fire.");
27 27
28 // Stop the infinite load. 28 // Stop the infinite load.
29 iframe.contentWindow.stop(); 29 stop();
30 } 30 }
31 </script> 31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698