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