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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/html/imports/sub-imports-onload.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/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 window.jsTestIsAsync = true; 6 window.jsTestIsAsync = true;
7 window.scheduledImportCount = 0; 7 window.scheduledImportCount = 0;
8 8
9 setPrintTestResultsLazily();
9 description("This ensures that load and error events are fired on sub-imports.") ; 10 description("This ensures that load and error events are fired on sub-imports.") ;
10 11
11 function handleEvent(event) 12 function handleEvent(event)
12 { 13 {
13 theEvent = event; 14 theEvent = event;
14 switch (event.target.getAttribute("href")) { 15 switch (event.target.getAttribute("href")) {
15 case "hello.html": 16 case "hello.html":
16 shouldBe("theEvent.type", "'load'"); 17 shouldBe("theEvent.type", "'load'");
17 shouldBe("theEvent.target.ownerDocument", "root.import"); 18 shouldBe("theEvent.target.ownerDocument", "root.import");
18 break; 19 break;
19 case "no-such-file.html": 20 case "no-such-file.html":
20 shouldBe("theEvent.type", "'error'"); 21 shouldBe("theEvent.type", "'error'");
21 shouldBe("theEvent.target.ownerDocument", "root.import"); 22 shouldBe("theEvent.target.ownerDocument", "root.import");
22 break; 23 break;
23 default: 24 default:
24 } 25 }
25 26
26 window.scheduledImportCount--; 27 window.scheduledImportCount--;
27 if (!window.scheduledImportCount) 28 if (!window.scheduledImportCount)
28 finishJSTest(); 29 finishJSTest();
29 } 30 }
30 </script> 31 </script>
31 <link id="root" rel="import" href="resources/onload-root.html"> 32 <link id="root" rel="import" href="resources/onload-root.html">
32 </head> 33 </head>
33 <body> 34 <body>
34 </body> 35 </body>
35 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698