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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLLinkElement/link-onload-before-page-load.html

Issue 1772853002: Block the HTML parser on external stylesheets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplified parser blocking logic Created 4 years, 9 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="resources/link-load-utilities.js"></script> 4 <script src="resources/link-load-utilities.js"></script>
5 <script> 5 <script>
6 var expectedLoadEventTargets = ["link", "body"]; 6 var expectedLoadEventTargets = ["link", "body"];
7 7
8 function didReceiveLoadEvent(elementName) 8 function didReceiveLoadEvent(elementName)
9 { 9 {
10 var expectedTarget = expectedLoadEventTargets.shift(); 10 var expectedTarget = expectedLoadEventTargets.shift();
11 if (expectedTarget === elementName) 11 if (expectedTarget === elementName)
12 testPassedAndNotifyDone("Fired Load event at " + elementName + "."); 12 testPassedAndNotifyDone("Fired Load event at " + elementName + ".");
13 else { 13 else {
14 // We don't call testFailedAndNotifyDone() or testFinished() because we want to log additional Load events as it 14 // We don't call testFailedAndNotifyDone() or testFinished() because we want to log additional Load events as it
15 // may help towards debugging this test case. 15 // may help towards debugging this test case.
16 testFailed("Fired Load event at " + elementName + ", but should have fired i t at " + expectedTarget + "."); 16 testFailed("Fired Load event at " + elementName + ", but should have fired i t at " + expectedTarget + ".");
17 } 17 }
18 } 18 }
19 </script> 19 </script>
20 <link rel="stylesheet" href="resources/stylesheet.css" onload="didReceiveLoadEve nt('link')">
21 </head> 20 </head>
22 <body onload="didReceiveLoadEvent('body')"> 21 <body onload="didReceiveLoadEvent('body')">
23 <p>This tests that a Load event for an HTML Link element comes before the Load e vent for the window. This test PASSED if you see the word PASS below. Otherwise, it FAILED.</p> 22 <p>This tests that a Load event for an HTML Link element comes before the Load e vent for the window. This test PASSED if you see the word PASS below. Otherwise, it FAILED.</p>
24 <pre id="console"></pre> 23 <pre id="console"></pre>
24 <link rel="stylesheet" href="resources/stylesheet.css" onload="didReceiveLoadEve nt('link')">
25 </body> 25 </body>
26 </html> 26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698