Changing pseudoClass (:disabled) should cause distribution.
[WebKit-https.git] / LayoutTests / fast / dom / shadow / pseudoclass-update-disabled-button.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 'disabled' state of a button tag is changed, we have to invalidate distribution.</p>
10
11 <div id="host1">
12     <button id="button1">Button 1</button>
13     <button id="button2">Button 2</button>
14 </div>
15
16 <div id="host2">
17     <button id="button3" disabled>Button 3</button>
18     <button id="button4" disabled>Button 4</button>
19 </div>
20
21 <script>
22 if (window.testRunner)
23     testRunner.waitUntilDone();
24
25 new WebKitShadowRoot(host1).innerHTML = '<content select=":disabled"></content>';
26 new WebKitShadowRoot(host2).innerHTML = '<content select=":disabled"></content>';
27
28 setTimeout(function() {
29     button2.setAttribute('disabled', true);
30     button4.removeAttribute('disabled');
31     testRunner.notifyDone();
32 }, 0);
33
34 </script>
35 </body>
36 </html>
37