OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <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> |
7 <div><a id="anchor-outside-of-shadow" href="/">tehepero</a></div> | 7 <div><a id="anchor-outside-of-shadow" href="/">tehepero</a></div> |
8 | 8 |
9 <script src="../../js/resources/js-test-pre.js"></script> | 9 <script src="../../../resources/js-test.js"></script> |
10 <script> | 10 <script> |
11 var container = document.getElementById('container'); | 11 var container = document.getElementById('container'); |
12 | 12 |
13 var shadowRoot = container.createShadowRoot(); | 13 var shadowRoot = container.createShadowRoot(); |
14 | 14 |
15 var base = document.createElement('base'); | 15 var base = document.createElement('base'); |
16 base.setAttribute('href', 'http://www.example.com/'); | 16 base.setAttribute('href', 'http://www.example.com/'); |
17 var anchorInShadow = document.createElement('a'); | 17 var anchorInShadow = document.createElement('a'); |
18 anchorInShadow.setAttribute('href', '/'); | 18 anchorInShadow.setAttribute('href', '/'); |
19 | 19 |
20 shadowRoot.appendChild(base); | 20 shadowRoot.appendChild(base); |
21 shadowRoot.appendChild(anchorInShadow); | 21 shadowRoot.appendChild(anchorInShadow); |
22 | 22 |
23 var anchorInHostChildren = document.getElementById('anchor-in-host-children'); | 23 var anchorInHostChildren = document.getElementById('anchor-in-host-children'); |
24 var anchorOutsideOfShadow = document.getElementById('anchor-outside-of-shadow'); | 24 var anchorOutsideOfShadow = document.getElementById('anchor-outside-of-shadow'); |
25 | 25 |
26 shouldBe('anchorInShadow.href.indexOf("http://www.example.com")', '-1'); | 26 shouldBe('anchorInShadow.href.indexOf("http://www.example.com")', '-1'); |
27 shouldBe('anchorInHostChildren.href.indexOf("http://www.example.com")', '-1'); | 27 shouldBe('anchorInHostChildren.href.indexOf("http://www.example.com")', '-1'); |
28 shouldBe('anchorOutsideOfShadow.href.indexOf("http://www.example.com")', '-1'); | 28 shouldBe('anchorOutsideOfShadow.href.indexOf("http://www.example.com")', '-1'); |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |