3 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
5 /* global SimpleTest SpecialPowers */
6 SimpleTest
.waitForExplicitFinish();
7 document
.addEventListener("DOMContentLoaded", async
function() {
8 await SpecialPowers
.pushPrefEnv({
10 ["privacy.resistFingerprinting", true]
14 let canvas
= document
.body
.appendChild(document
.createElement("canvas"));
16 SimpleTest
.ok(false, "Cannot create canvas");
20 let gl
= canvas
.getContext("webgl");
22 SimpleTest
.ok(false, "Cannot get WebGL context");
26 SimpleTest
.is(gl
.getParameter(gl
.MAX_TEXTURE_SIZE
), 2048, "MAX_TEXTURE_SIZE");
27 SimpleTest
.is(gl
.getParameter(gl
.MAX_CUBE_MAP_TEXTURE_SIZE
), 2048, "MAX_CUBE_MAP_TEXTURE_SIZE");
28 SimpleTest
.is(gl
.getParameter(gl
.MAX_RENDERBUFFER_SIZE
), 2048, "MAX_RENDERBUFFER_SIZE");
29 SimpleTest
.is(gl
.getParameter(gl
.MAX_VERTEX_TEXTURE_IMAGE_UNITS
), 8, "MAX_VERTEX_TEXTURE_IMAGE_UNITS");
30 SimpleTest
.is(gl
.getParameter(gl
.MAX_TEXTURE_IMAGE_UNITS
), 8, "MAX_TEXTURE_IMAGE_UNITS");
31 SimpleTest
.is(gl
.getParameter(gl
.MAX_COMBINED_TEXTURE_IMAGE_UNITS
), 16, "MAX_COMBINED_TEXTURE_IMAGE_UNITS");
32 SimpleTest
.is(gl
.getParameter(gl
.MAX_VERTEX_ATTRIBS
), 16, "MAX_VERTEX_ATTRIBS");
33 SimpleTest
.is(gl
.getParameter(gl
.MAX_VERTEX_UNIFORM_VECTORS
), 256, "MAX_VERTEX_UNIFORM_VECTORS");
34 SimpleTest
.is(gl
.getParameter(gl
.MAX_FRAGMENT_UNIFORM_VECTORS
), 224, "MAX_FRAGMENT_UNIFORM_VECTORS");
35 SimpleTest
.is(gl
.getParameter(gl
.MAX_VARYING_VECTORS
), 8, "MAX_VARYING_VECTORS");
36 let viewportDims
= gl
.getParameter(gl
.MAX_VIEWPORT_DIMS
);
37 SimpleTest
.is(viewportDims
[0], 4096, "MAX_VIEWPORT_DIMS[0]");
38 SimpleTest
.is(viewportDims
[1], 4096, "MAX_VIEWPORT_DIMS[1]");
39 let aliasedPointSizeRange
= gl
.getParameter(gl
.ALIASED_POINT_SIZE_RANGE
);
40 SimpleTest
.is(aliasedPointSizeRange
[0], 1, "ALIASED_POINT_SIZE_RANGE[0]");
41 SimpleTest
.is(aliasedPointSizeRange
[1], 63, "ALIASED_POINT_SIZE_RANGE[1]");
42 let aliasedLineWIdthRange
= gl
.getParameter(gl
.ALIASED_LINE_WIDTH_RANGE
);
43 SimpleTest
.is(aliasedLineWIdthRange
[0], 1, "ALIASED_LINE_WIDTH_RANGE[0]");
44 SimpleTest
.is(aliasedLineWIdthRange
[1], 1, "ALIASED_LINE_WIDTH_RANGE[1]");