-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathScreen-pixelDepth-Screen-colorDepth001.html
More file actions
35 lines (35 loc) · 1.29 KB
/
Screen-pixelDepth-Screen-colorDepth001.html
File metadata and controls
35 lines (35 loc) · 1.29 KB
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
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<title>CSSOM View Module test:Screen-pixelDepth,Screen-colorDepth</title>
<link rel="author" title="unbug" href="mailto:tidelgl@gmail.com" />
<link rel="help" href="https://umn0mtkzgkj46tygt32g.julianrbryant.com/TR/cssom-view/#the-screen-interface">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style type="text/css">
</style>
</head>
<body>
<p>This case tests the Screen pixelDepth and colorDepth</p>
<p>The test passes if the value is either 24 or 30</p>
<div id="log"></div>
<script>
test(function(){
let colorDepth = testColorDepth();
assert_true(colorDepth == 24 || colorDepth == 30, "Expected value for colorDepth is either 24 or 30");
},'testColorDepth');
test(function(){
let pixelDepth = testPixelDepth();
assert_true(pixelDepth == 24 || pixelDepth == 30, "Expected value for pixelDepth is either 24 or 30");
},'testPixelDepth');
function testColorDepth(){
var colorDepth = window.screen.colorDepth;
return colorDepth;
}
function testPixelDepth(){
var pixelDepth = window.screen.pixelDepth;
return pixelDepth;
}
</script>
</body>
</html>