Chaging pseudoClass (:enabled) should cause distribution
[WebKit-https.git] / LayoutTests / fast / dom / shadow / pseudoclass-update-enabled-anchor.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="resources/polyfill.js"></script>
5 </head>
6
7 <body>
8
9 <p>When an anchor tag catch 'href' attribute or release 'href' attribute, distribution should happen.</p>
10
11 <div id="host1">
12     <a id="anchor1" href="http://www.example.com/">Anchor 1</a>
13     <a id="anchor2" href="http://www.example.com/">Anchor 2</a>
14 </div>
15
16 <div id="host2">
17     <a id="anchor3">Anchor 3</a>
18     <a id="anchor4">Anchor 4</a>
19 </div>
20
21 <script>
22 if (window.testRunner)
23     testRunner.waitUntilDone();
24
25 new WebKitShadowRoot(host1).innerHTML = '<content select=":enabled"></content>';
26 new WebKitShadowRoot(host2).innerHTML = '<content select=":enabled"></content>';
27
28 setTimeout(function() {
29     anchor2.removeAttribute('href');
30     anchor4.setAttribute('href', 'http://www.example.com/');
31     testRunner.notifyDone();
32 }, 0);
33
34 </script>
35 </body>
36 </html>
37