OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <style> | 5 <style> |
6 button { | 6 button { |
7 color: green; | 7 color: green; |
8 } | 8 } |
9 | 9 |
10 button:disabled { | 10 button:disabled { |
11 color: red; | 11 color: red; |
12 } | 12 } |
13 | 13 |
14 .trigger-style-recalc { | 14 .trigger-style-recalc { |
15 /* No change, we just need a new style recalculation. */ | 15 /* No change, we just need a new style recalculation. */ |
16 } | 16 } |
17 </style> | 17 </style> |
18 </head> | 18 </head> |
19 <body style="color: green"> | 19 <body style="color: green"> |
20 <button>The test passes if this is in green.</button> | 20 <button>The test passes if this is in green.</button> |
21 <dialog></dialog> | 21 <dialog></dialog> |
22 <script> | 22 <script> |
23 description('Tests that inert elements do not match the :disabled selector.'); | 23 description('Tests that inert elements do not match the :disabled selector.'); |
24 document.querySelector('dialog').showModal(); | 24 document.querySelector('dialog').showModal(); |
25 button = document.querySelector('button'); | 25 button = document.querySelector('button'); |
26 button.classList.add('trigger-style-recalc'); | 26 button.classList.add('trigger-style-recalc'); |
27 color = document.defaultView.getComputedStyle(button).getPropertyValue('color'); | 27 color = document.defaultView.getComputedStyle(button).getPropertyValue('color'); |
28 shouldBe('color', "'rgb(0, 128, 0)'"); | 28 shouldBe('color', "'rgb(0, 128, 0)'"); |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |