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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/html/imports/resources/script-prototype-test.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 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 setPrintTestResultsLazily();
8 description("This test ensures each import and master is in same JS context."); 9 description("This test ensures each import and master is in same JS context.");
9 10
10 var stringInImport = "Import"; 11 var stringInImport = "Import";
11 shouldBe("stringInMaster.__proto__", "stringInImport.__proto__"); 12 shouldBe("stringInMaster.__proto__", "stringInImport.__proto__");
12 13
13 var thisDocument = document.currentScript.ownerDocument; 14 var thisDocument = document.currentScript.ownerDocument;
14 shouldBeTrue("thisDocument !== document"); 15 shouldBeTrue("thisDocument !== document");
15 shouldBe("thisDocument.__proto__", "document.__proto__"); 16 shouldBe("thisDocument.__proto__", "document.__proto__");
16 shouldBe("thisDocument.head.__proto__", "document.head.__proto__"); 17 shouldBe("thisDocument.head.__proto__", "document.head.__proto__");
17 18
18 // Since the construcdtor belongs to master's window, its owner document is the master 19 // Since the construcdtor belongs to master's window, its owner document is the master
19 shouldBe("(new Image()).ownerDocument", "document"); 20 shouldBe("(new Image()).ownerDocument", "document");
20 21
21 // With createElement(), we know who is the owner. 22 // With createElement(), we know who is the owner.
22 shouldBe("thisDocument.createElement('div').ownerDocument", "thisDocument"); 23 shouldBe("thisDocument.createElement('div').ownerDocument", "thisDocument");
23 shouldBe("document.createElement('div').ownerDocument", "document"); 24 shouldBe("document.createElement('div').ownerDocument", "document");
24 25
25 </script> 26 </script>
26 </body> 27 </body>
27 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698