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

Side by Side Diff: LayoutTests/fast/dom/shadow/element-name-in-shadow.html

Issue 1291723004: Remove all support for <applet> handling in Chrome. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 3 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 <div></div> 7 <div></div>
8 <script> 8 <script>
9 var div = document.querySelector("div"); 9 var div = document.querySelector("div");
10 document.body.appendChild(div); 10 document.body.appendChild(div);
11 var shadowRoot = div.createShadowRoot(); 11 var shadowRoot = div.createShadowRoot();
12 12
13 //Window named properties 13 //Window named properties
14 var namedElements = ['a', 'applet', 'area', 'embed', 'form', 'frame', 14 var namedElements = ['a', 'area', 'embed', 'form', 'frame',
15 'frameset', 'iframe','img', 'object']; 15 'frameset', 'iframe','img', 'object'];
16 16
17 var element; 17 var element;
18 namedElements.forEach(function (tagName) { 18 namedElements.forEach(function (tagName) {
19 element = document.createElement(tagName); 19 element = document.createElement(tagName);
20 element.name = 'named_' + tagName; 20 element.name = 'named_' + tagName;
21 21
22 debug("&lt;" + tagName + "&gt;: Before appendChild, " + element.name + " sho uld not be in document."); 22 debug("&lt;" + tagName + "&gt;: Before appendChild, " + element.name + " sho uld not be in document.");
23 shouldBeFalse("element.name in document"); 23 shouldBeFalse("element.name in document");
24 shouldBeFalse("element.name in window"); 24 shouldBeFalse("element.name in window");
25 shadowRoot.appendChild(element); 25 shadowRoot.appendChild(element);
26 debug("&lt;" + tagName + "&gt;: After appendChild, " + element.name + " shou ld not still be in document, because the element was inserted into a shadow DOM tree."); 26 debug("&lt;" + tagName + "&gt;: After appendChild, " + element.name + " shou ld not still be in document, because the element was inserted into a shadow DOM tree.");
27 shouldBeFalse("element.name in document"); 27 shouldBeFalse("element.name in document");
28 shouldBeFalse("element.name in window"); 28 shouldBeFalse("element.name in window");
29 29
30 element.setAttribute('name', 'renamed_' + tagName); 30 element.setAttribute('name', 'renamed_' + tagName);
31 debug("&lt;" + tagName + "&gt;: After changing its name attribute into " + e lement.name + " by using setAttribute, the name should not still be in document. "); 31 debug("&lt;" + tagName + "&gt;: After changing its name attribute into " + e lement.name + " by using setAttribute, the name should not still be in document. ");
32 shouldBeFalse("element.name in document"); 32 shouldBeFalse("element.name in document");
33 shouldBeFalse("element.name in window"); 33 shouldBeFalse("element.name in window");
34 element.name = 're-renamed_' + tagName; 34 element.name = 're-renamed_' + tagName;
35 debug("&lt;" + tagName + "&gt;: After changing its name attribute into " + e lement.name + " by using '.name=', the name should not still be in document."); 35 debug("&lt;" + tagName + "&gt;: After changing its name attribute into " + e lement.name + " by using '.name=', the name should not still be in document.");
36 shouldBeFalse("element.name in document"); 36 shouldBeFalse("element.name in document");
37 shouldBeFalse("element.name in window"); 37 shouldBeFalse("element.name in window");
38 }); 38 });
39 </script> 39 </script>
40 </body> 40 </body>
41 </html> 41 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698