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

Side by Side Diff: LayoutTests/fast/dom/shadow/getelementbyid-shadow.html

Issue 799543002: Let ShadowRoot.getElementById() fall back to DocumentFragment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update tests Created 6 years 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/dom/shadow/getelementbyid-shadow-expected.txt » ('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 <body> 3 <body>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 5
6 <div id="container"></div> 6 <div id="container"></div>
7 <pre id="console"></pre> 7 <pre id="console"></pre>
8 8
9 <script> 9 <script>
10 description("Tests to ensure ShadowRoot.getElementById works after complex DOM m anipulation."); 10 description("Tests to ensure ShadowRoot.getElementById works after complex DOM m anipulation.");
(...skipping 12 matching lines...) Expand all
23 var shadowRootA = A.createShadowRoot(); 23 var shadowRootA = A.createShadowRoot();
24 var shadowRootB = B.createShadowRoot(); 24 var shadowRootB = B.createShadowRoot();
25 var shadowRootC = C.createShadowRoot(); 25 var shadowRootC = C.createShadowRoot();
26 26
27 shadowRootA.appendChild(B); 27 shadowRootA.appendChild(B);
28 shadowRootB.appendChild(C); 28 shadowRootB.appendChild(C);
29 shadowRootC.appendChild(D); 29 shadowRootC.appendChild(D);
30 30
31 container.appendChild(A); 31 container.appendChild(A);
32 shouldBe('document.getElementById("A")', 'A'); 32 shouldBe('document.getElementById("A")', 'A');
33 shouldThrow('shadowRootA.getElementById()');
33 shouldBe('shadowRootA.getElementById("B")', 'B'); 34 shouldBe('shadowRootA.getElementById("B")', 'B');
34 shouldBe('shadowRootB.getElementById("C")', 'C'); 35 shouldBe('shadowRootB.getElementById("C")', 'C');
35 shouldBe('shadowRootC.getElementById("D")', 'D'); 36 shouldBe('shadowRootC.getElementById("D")', 'D');
36 37
37 debug(''); 38 debug('');
38 debug('Remove C from shadowRootB'); 39 debug('Remove C from shadowRootB');
39 shadowRootB.removeChild(C); 40 shadowRootB.removeChild(C);
40 41
41 shouldBe('document.getElementById("A")', 'A'); 42 shouldBe('document.getElementById("A")', 'A');
42 shouldBe('shadowRootA.getElementById("B")', 'B'); 43 shouldBe('shadowRootA.getElementById("B")', 'B');
(...skipping 24 matching lines...) Expand all
67 shadowRootC.removeChild(D); 68 shadowRootC.removeChild(D);
68 69
69 shouldBe('document.getElementById("A")', 'null'); 70 shouldBe('document.getElementById("A")', 'null');
70 shouldBe('shadowRootA.getElementById("B")', 'B'); 71 shouldBe('shadowRootA.getElementById("B")', 'B');
71 shouldBe('shadowRootB.getElementById("C")', 'null'); 72 shouldBe('shadowRootB.getElementById("C")', 'null');
72 shouldBe('shadowRootC.getElementById("D")', 'null'); 73 shouldBe('shadowRootC.getElementById("D")', 'null');
73 74
74 </script> 75 </script>
75 </body> 76 </body>
76 </html> 77 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/getelementbyid-shadow-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698