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

Side by Side Diff: LayoutTests/fast/html/imports/import-dynamic.html

Issue 265453003: HTML Imports: Let dynamically-added imports sync. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Landing. Created 6 years, 7 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> 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 description("This test ensures that script-added import doesn't block scripts"); 8 description("This test ensures that script-added import doesn't block scripts");
9 9
10 window.jsTestIsAsync = true; 10 window.jsTestIsAsync = true;
11 11
12 var importIsLoaded = false; 12 var importIsLoaded = false;
13 var scriptIsExecuted = false; 13 var scriptIsExecuted = false;
14 14
15 var linkEl = document.createElement("link"); 15 var linkEl = document.createElement("link");
16 linkEl.setAttribute("rel", "import"); 16 linkEl.setAttribute("rel", "import");
17 linkEl.setAttribute("href", "resources/async-child.html"); 17 linkEl.setAttribute("href", "resources/async-child.html");
18 document.head.appendChild(linkEl); 18 document.head.appendChild(linkEl);
19 linkEl.onload = function(evt) { 19 linkEl.onload = function(evt) {
20 debug("In onload handler - This should be called later."); 20 debug("In onload handler - This should be called later.");
21 shouldBeTrue("importIsLoaded"); 21 shouldBeTrue("importIsLoaded");
22 shouldBeTrue("scriptIsExecuted"); 22 shouldBeTrue("scriptIsExecuted");
23 finishJSTest(); 23 finishJSTest();
24 }; 24 };
25 25
26 </script> 26 </script>
27 <script> 27 <script>
28 debug("In script tag - This should be called first."); 28 debug("In script tag - This should be called first.");
29 shouldBeFalse("importIsLoaded"); 29 shouldBeTrue("importIsLoaded");
30 scriptIsExecuted = true; 30 scriptIsExecuted = true;
31 </script> 31 </script>
32 </body> 32 </body>
33 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698