Chaging pseudoClass (:enabled) should cause distribution
[WebKit-https.git] / LayoutTests / fast / dom / shadow / pseudoclass-update-enabled-fieldset.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 a fieldset tag is changed, we have to invalidate distribution.</p>
10
11 <div id="host1">
12     <fieldset id="fieldset1">Fieldset 1</fieldset>
13     <fieldset id="fieldset2">Fieldset 2</fieldset>
14 </div>
15
16 <div id="host2">
17     <fieldset id="fieldset3" disabled>Fieldset 3</fieldset>
18     <fieldset id="fieldset4" disabled>Fieldset 4</fieldset>
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     fieldset2.setAttribute('disabled', true);
30     fieldset4.removeAttribute('disabled');
31     testRunner.notifyDone();
32 }, 0);
33
34 </script>
35 </body>
36 </html>
37