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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/layout-tests-can-access-shadow.html

Issue 2536993002: Remove support for the keygen tag (Closed)
Patch Set: Rebased Created 3 years, 12 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 <keygen id="keys" /> 7 <progress id="progress" max=100></progress>
8 <p id="peas" /> 8 <p id="peas" />
9 <pre id="console"> 9 <pre id="console">
10 This tests that layout tests can access shadow DOM. 10 This tests that layout tests can access shadow DOM.
11 11
12 </pre> 12 </pre>
13 <script> 13 <script>
14 if (window.internals) { 14 if (window.internals) {
15 // Make assertions about a built-in shadow 15 // Make assertions about a built-in shadow
16 var keygen = document.getElementById('keys'); 16 var progress = document.getElementById('progress');
17 var shadow = internals.shadowRoot(keygen); 17 var shadow = internals.shadowRoot(progress);
18 shouldBe('shadow.nodeName', '"#document-fragment"'); 18 shouldBe('shadow.nodeName', '"#document-fragment"');
19 19
20 // Shadow roots aren't elements, so accessing their shadow should throw. 20 // Shadow roots aren't elements, so accessing their shadow should throw.
21 shouldThrow("internals.shadowRoot(shadow)"); 21 shouldThrow("internals.shadowRoot(shadow)");
22 22
23 // Ordinary element should not have shadow 23 // Ordinary element should not have shadow
24 var p = document.getElementById('peas'); 24 var p = document.getElementById('peas');
25 shouldBe('internals.shadowRoot(p)', 'null'); 25 shouldBe('internals.shadowRoot(p)', 'null');
26 26
27 // Can bless ordinary elements with shadows 27 // Can bless ordinary elements with shadows
28 shadow = p.createShadowRoot(p); 28 shadow = p.createShadowRoot(p);
29 shouldBe('shadow.nodeName', '"#document-fragment"'); 29 shouldBe('shadow.nodeName', '"#document-fragment"');
30 shouldBe('shadow === internals.shadowRoot(p)', 'true'); 30 shouldBe('shadow === internals.shadowRoot(p)', 'true');
31 } 31 }
32 </script> 32 </script>
33 </body> 33 </body>
34 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698