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

Side by Side Diff: LayoutTests/fast/dom/shadow/shadow-root-js-api.html

Issue 11776020: Merge 138165 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/shadow-root-js-api-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 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <div id="console"></div> 7 <div id="console"></div>
8 <!-- These elements should not be selected in ShadowRoot's querySelector. --> 8 <!-- These elements should not be selected in ShadowRoot's querySelector. -->
9 <div id="foo"></div> 9 <div id="foo"></div>
10 <div class="foo"></div> 10 <div class="foo"></div>
11 <foo></foo> 11 <foo></foo>
12 <script> 12 <script>
13 description("Tests for ShadowRoot JS APIs. Can only run within DRT"); 13 description("Tests for ShadowRoot JS APIs. Can only run within DRT");
14 14
15 if (window.testRunner) 15 if (window.testRunner)
16 testRunner.dumpAsText(); 16 testRunner.dumpAsText();
17
18 shouldBeUndefined("window.ShadowRoot");
19 shouldBeDefined("window.WebKitShadowRoot");
20 shouldThrow("new window.WebKitShadowRoot(document.createElement('div'))");
21
17 var shadowHost = document.createElement('div'); 22 var shadowHost = document.createElement('div');
18 document.body.appendChild(shadowHost); 23 document.body.appendChild(shadowHost);
19 var shadowRoot = shadowHost.webkitCreateShadowRoot(); 24 var shadowRoot = shadowHost.webkitCreateShadowRoot();
20 25
26 shouldBeTrue("shadowRoot instanceof window.WebKitShadowRoot");
27
21 var div1 = document.createElement("div"); 28 var div1 = document.createElement("div");
22 div1.setAttribute("id", "div1"); 29 div1.setAttribute("id", "div1");
23 shadowRoot.appendChild(div1); 30 shadowRoot.appendChild(div1);
24 31
25 var div2 = document.createElement("div"); 32 var div2 = document.createElement("div");
26 div2.setAttribute("id", "div2"); 33 div2.setAttribute("id", "div2");
27 div2.classList.add("class2"); 34 div2.classList.add("class2");
28 shadowRoot.appendChild(div2); 35 shadowRoot.appendChild(div2);
29 36
30 // Tests for Document should cover most cases for the following APIs. 37 // Tests for Document should cover most cases for the following APIs.
(...skipping 20 matching lines...) Expand all
51 shouldBe("shadowRoot.querySelectorAll('foo')", "[]"); 58 shouldBe("shadowRoot.querySelectorAll('foo')", "[]");
52 59
53 var youngerShadowRoot = shadowHost.webkitCreateShadowRoot(); 60 var youngerShadowRoot = shadowHost.webkitCreateShadowRoot();
54 shouldNotBe("youngerShadowRoot", "shadowRoot"); 61 shouldNotBe("youngerShadowRoot", "shadowRoot");
55 62
56 63
57 </script> 64 </script>
58 <script src="../../js/resources/js-test-post.js"></script> 65 <script src="../../js/resources/js-test-post.js"></script>
59 </body> 66 </body>
60 </html> 67 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/shadow-root-js-api-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698