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

Side by Side Diff: LayoutTests/fast/html/imports/import-element-removed-flag.html

Issue 270623007: Revert "HTML Imports: Fix yet another FOUC" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed bad merge. 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
« no previous file with comments | « no previous file | LayoutTests/fast/html/imports/import-ignore-document-write.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 <head> 4 <head>
5 <link id="staticImportLink" rel="import" href="resources/hello.html"> 5 <link id="staticImportLink" rel="import" href="resources/hello.html">
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 description("This tests 'element removed flag' behavior defined in https://dvcs. w3.org/hg/webcomponents/raw-file/tip/spec/imports/index.html#dfn-element-removed -flag."); 9 description("This tests 'element removed flag' behavior defined in https://dvcs. w3.org/hg/webcomponents/raw-file/tip/spec/imports/index.html#dfn-element-removed -flag.");
10 window.jsTestIsAsync = true; 10 window.jsTestIsAsync = true;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 dynamicImport.setAttribute("href", "resources/bye.html"); 42 dynamicImport.setAttribute("href", "resources/bye.html");
43 dynamicImport.addEventListener("load", check); 43 dynamicImport.addEventListener("load", check);
44 document.head.appendChild(dynamicImport); 44 document.head.appendChild(dynamicImport);
45 } 45 }
46 46
47 function testDynamicImportRemovingEagerly() 47 function testDynamicImportRemovingEagerly()
48 { 48 {
49 dynamicImportEager = document.createElement("link"); 49 dynamicImportEager = document.createElement("link");
50 dynamicImportEager.setAttribute("rel", "import"); 50 dynamicImportEager.setAttribute("rel", "import");
51 dynamicImportEager.setAttribute("href", "resources/setting-greet-var.html"); 51 dynamicImportEager.setAttribute("href", "resources/setting-greet-var.html");
52 dynamicImportEager.addEventListener("load", check);
52 document.head.appendChild(dynamicImportEager); 53 document.head.appendChild(dynamicImportEager);
53 54
54 // Reoving <link> just after appending it. 55 // Reoving <link> just after appending it.
55 // This should start import loading, but shouldn't make .import visible. 56 // This should start import loading, but shouldn't make .import visible.
56 dynamicImportEager.remove(); 57 dynamicImportEager.remove();
57 58
58 function check() 59 function check()
59 { 60 {
60 if (window.greet != "Hello") { 61 if (window.greet != "Hello") {
61 window.setTimeout(check, 0); 62 window.setTimeout(check, 0);
62 return; 63 return;
63 } 64 }
64 65
65 shouldBeNull("dynamicImportEager.import"); 66 shouldBeNull("dynamicImportEager.import");
66 document.head.appendChild(dynamicImportEager); 67 document.head.appendChild(dynamicImportEager);
67 shouldBeNonNull("dynamicImportEager.import"); 68 shouldBeNonNull("dynamicImportEager.import");
68 69
69 window.requestAnimationFrame(function() { finishJSTest(); }, 0); 70 window.requestAnimationFrame(function() { finishJSTest(); }, 0);
70 } 71 }
71 72
72 window.setTimeout(check, 0); 73 window.setTimeout(check, 0);
73 } 74 }
74 75
75 testStaticImport(); 76 testStaticImport();
76 testDynamicImport(); 77 testDynamicImport();
77 78
78 </script> 79 </script>
79 </body> 80 </body>
80 </html> 81 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/html/imports/import-ignore-document-write.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698