blob: a2fc4eb1744222d5754c8c867a21269628131933 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<html>
<head>
<style id="style1">
@media all and (min-color: 24) { .insane { color: green; } }
@media all and (min-color: 2) { .sane { color: green; } }
</style>
<script>
function runTest() {
if (window.testRunner)
testRunner.dumpAsText();
try {
document.getElementById('result').innerHTML += window.getComputedStyle(document.getElementById('result')).getPropertyValue("color");
document.getElementById('result2').innerHTML += window.getComputedStyle(document.getElementById('result2')).getPropertyValue("color");
} catch (e) {
document.getElementById('result').innerHTML = 'EXCEPTION';
}
}
</script>
</head>
<body onload="runTest();">
<p> https://bugs.webkit.org/show_bug.cgi?id=20289 </p>
Sanity check screenDepthPerComponent to ensure it is returning the number of bits per color rather than the screen depth (e.g. 24).
<div class="insane" id="result">Should be rgb(0, 0, 0): </div>
<div class="sane" id="result2">Should be rgb(0, 128, 0): </div>
</body>
</html>
|