1 This test ensures WebGL implementations correctly implement drawingbufferWidth/Height.
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 PASS gl.drawingBufferWidth is gl.canvas.width
7 PASS gl.drawingBufferHeight is gl.canvas.height
8 PASS maxSize[0] > 0 is true
9 PASS maxSize[1] > 0 is true
11 Checking drawingBufferWidth/drawingBufferHeight
13 PASS gl.getParameter(gl.MAX_VIEWPORT_DIMS)[0] is maxSize[0]
14 PASS gl.getParameter(gl.MAX_VIEWPORT_DIMS)[1] is maxSize[1]
15 PASS gl.getParameter(gl.VIEWPORT)[0] is 0
16 PASS gl.getParameter(gl.VIEWPORT)[1] is 0
17 PASS gl.getParameter(gl.VIEWPORT)[2] is gl.drawingBufferWidth
18 PASS gl.getParameter(gl.VIEWPORT)[3] is gl.drawingBufferHeight
19 PASS gl.getError() is gl.NO_ERROR
20 PASS grid rendered correctly
24 PASS gl.getError() is gl.NO_ERROR
26 Testing resizing canvas
27 PASS gl.getParameter(gl.VIEWPORT)[0] is oldViewport[0]
28 PASS gl.getParameter(gl.VIEWPORT)[1] is oldViewport[1]
29 PASS gl.getParameter(gl.VIEWPORT)[2] is oldViewport[2]
30 PASS gl.getParameter(gl.VIEWPORT)[3] is oldViewport[3]
31 PASS gl.getError() is gl.NO_ERROR
32 PASS grid rendered correctly
36 PASS gl.getError() is gl.NO_ERROR
38 Checking drawingBufferWidth/drawingBufferHeight
40 PASS gl.getParameter(gl.MAX_VIEWPORT_DIMS)[0] is maxSize[0]
41 PASS gl.getParameter(gl.MAX_VIEWPORT_DIMS)[1] is maxSize[1]
42 PASS gl.getParameter(gl.VIEWPORT)[0] is 0
43 PASS gl.getParameter(gl.VIEWPORT)[1] is 0
44 PASS gl.getParameter(gl.VIEWPORT)[2] is gl.drawingBufferWidth
45 PASS gl.getParameter(gl.VIEWPORT)[3] is gl.drawingBufferHeight
46 PASS gl.getError() is gl.NO_ERROR
47 PASS grid rendered correctly
51 PASS gl.getError() is gl.NO_ERROR
53 Testing resizing canvas
54 PASS gl.getParameter(gl.VIEWPORT)[0] is oldViewport[0]
55 PASS gl.getParameter(gl.VIEWPORT)[1] is oldViewport[1]
56 PASS gl.getParameter(gl.VIEWPORT)[2] is oldViewport[2]
57 PASS gl.getParameter(gl.VIEWPORT)[3] is oldViewport[3]
58 PASS gl.getError() is gl.NO_ERROR
59 PASS grid rendered correctly
63 PASS gl.getError() is gl.NO_ERROR
65 PASS successfullyParsed is true