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