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

Side by Side Diff: LayoutTests/fast/dom/shadow/base-in-shadow-tree.html

Issue 14594006: Remove Internals::createShadowRoot(element) and polyfill.js. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="resources/polyfill.js"></script>
5 </head> 4 </head>
6 <body> 5 <body>
7 <div id="container"><a id="anchor-in-host-children" href="/">tehepero</a></div> 6 <div id="container"><a id="anchor-in-host-children" href="/">tehepero</a></div>
8 <div><a id="anchor-outside-of-shadow" href="/">tehepero</a></div> 7 <div><a id="anchor-outside-of-shadow" href="/">tehepero</a></div>
9 8
10 <script src="../../js/resources/js-test-pre.js"></script> 9 <script src="../../js/resources/js-test-pre.js"></script>
11 <script> 10 <script>
12 var container = document.getElementById('container'); 11 var container = document.getElementById('container');
13 12
14 var shadowRoot = container.webkitCreateShadowRoot(); 13 var shadowRoot = container.webkitCreateShadowRoot();
15 14
16 var base = document.createElement('base'); 15 var base = document.createElement('base');
17 base.setAttribute('href', 'http://www.example.com/'); 16 base.setAttribute('href', 'http://www.example.com/');
18 var anchorInShadow = document.createElement('a'); 17 var anchorInShadow = document.createElement('a');
19 anchorInShadow.setAttribute('href', '/'); 18 anchorInShadow.setAttribute('href', '/');
20 19
21 shadowRoot.appendChild(base); 20 shadowRoot.appendChild(base);
22 shadowRoot.appendChild(anchorInShadow); 21 shadowRoot.appendChild(anchorInShadow);
23 22
24 var anchorInHostChildren = document.getElementById('anchor-in-host-children'); 23 var anchorInHostChildren = document.getElementById('anchor-in-host-children');
25 var anchorOutsideOfShadow = document.getElementById('anchor-outside-of-shadow'); 24 var anchorOutsideOfShadow = document.getElementById('anchor-outside-of-shadow');
26 25
27 shouldBe('anchorInShadow.href.indexOf("http://www.example.com")', '-1'); 26 shouldBe('anchorInShadow.href.indexOf("http://www.example.com")', '-1');
28 shouldBe('anchorInHostChildren.href.indexOf("http://www.example.com")', '-1'); 27 shouldBe('anchorInHostChildren.href.indexOf("http://www.example.com")', '-1');
29 shouldBe('anchorOutsideOfShadow.href.indexOf("http://www.example.com")', '-1'); 28 shouldBe('anchorOutsideOfShadow.href.indexOf("http://www.example.com")', '-1');
30 </script> 29 </script>
31 <script src="../../js/resources/js-test-post.js"></script> 30 <script src="../../js/resources/js-test-post.js"></script>
32 </body> 31 </body>
33 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698