antti@apple.com | 7162dbc | 2018-07-05 03:50:56 +0000 | [diff] [blame] | 1 | <script src="../../resources/js-test-pre.js"></script> |
| 2 | <div id=test></div> |
| 3 | <script> |
| 4 | testRunner.addUserStyleSheet("@media (prefers-dark-interface) { #test { color: green } }", true); |
| 5 | testRunner.addUserStyleSheet("@media not screen and (prefers-dark-interface) { #test { color: green } }", true); |
| 6 | |
| 7 | shouldBeEqualToString("getComputedStyle(test).color", "rgb(0, 0, 0)"); |
| 8 | internals.setUseSystemAppearance(true); |
| 9 | shouldBeEqualToString("getComputedStyle(test).color", "rgb(0, 128, 0)"); |
| 10 | internals.setUseSystemAppearance(false); |
| 11 | shouldBeEqualToString("getComputedStyle(test).color", "rgb(0, 0, 0)"); |
| 12 | </script> |
| 13 | <script src="../../resources/js-test-post.js"></script> |