Chaging pseudoClass (:enabled) should cause distribution
[WebKit-https.git] / LayoutTests / fast / dom / shadow / pseudoclass-update-enabled-input.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="resources/polyfill.js"></script>
5 </head>
6
7 <body>
8
9 <p>When the 'enabled' state of an input tag is changed, we have to invalidate distribution.</p>
10
11 <div id="host1">
12     <input id="input1" value="Input 1">
13     <input id="input2" value="Input 2">
14 </div>
15
16 <div id="host2">
17     <input id="input3" value="Input 3" disabled>
18     <input id="input4" value="Input 4" disabled>
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     input2.setAttribute('disabled', true);
30     input4.removeAttribute('disabled');
31     testRunner.notifyDone();
32 }, 0);
33
34 </script>
35 </body>
36 </html>
37