| OLD | NEW |
| (Empty) |
| 1 Verify WebGLContextAttributes are working as specified, including alpha, depth,
stencil, antialias, but not premultipliedAlpha | |
| 2 | |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 4 | |
| 5 PASS successfullyParsed is true | |
| 6 | |
| 7 TEST COMPLETE | |
| 8 Testing default attributes: { stencil:false } | |
| 9 PASS getError was expected value: NO_ERROR : should be no errors | |
| 10 PASS gl = getWebGL(1, 1, null, [ 0, 0, 0, 0 ], 1, 0) is non-null. | |
| 11 PASS gl.getContextAttributes().stencil is false | |
| 12 PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true | |
| 13 Testing alpha = true | |
| 14 PASS getError was expected value: NO_ERROR : should be no errors | |
| 15 PASS gl = getWebGL(1, 1, { alpha: true, depth: false, stencil: false, antialias:
false }, [ 0, 0, 0, 0 ], 1, 0) is non-null. | |
| 16 PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true | |
| 17 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 18 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 19 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 20 PASS gl.getParameter(gl.DEPTH_BITS) == 0 is true | |
| 21 PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true | |
| 22 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 23 PASS contextAttribs.alpha == true is true | |
| 24 PASS pixel is correctColor | |
| 25 PASS Math.abs(pixel[0] - 127) <= 1 && Math.abs(pixel[1] - 127) <= 1 && Math.abs(
pixel[2] - 127) <= 1 && Math.abs(pixel[3] - 127) <= 1 is true | |
| 26 Testing alpha = false | |
| 27 PASS getError was expected value: NO_ERROR : should be no errors | |
| 28 PASS gl = getWebGL(1, 1, { alpha: false, depth: false, stencil: false, antialias
: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null. | |
| 29 PASS gl.getParameter(gl.ALPHA_BITS) == 0 is true | |
| 30 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 31 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 32 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 33 PASS gl.getParameter(gl.DEPTH_BITS) == 0 is true | |
| 34 PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true | |
| 35 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 36 PASS contextAttribs.alpha == false is true | |
| 37 PASS pixel is correctColor | |
| 38 PASS Math.abs(pixel[0] - 127) <= 1 && Math.abs(pixel[1] - 127) <= 1 && Math.abs(
pixel[2] - 127) <= 1 && Math.abs(pixel[3] - 127) <= 1 is true | |
| 39 Testing depth = true | |
| 40 PASS getError was expected value: NO_ERROR : should be no errors | |
| 41 PASS gl = getWebGL(1, 1, { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1
, 0) is non-null. | |
| 42 PASS gl.getParameter(gl.DEPTH_BITS) >= 16 is true | |
| 43 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 44 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 45 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 46 PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true | |
| 47 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 48 PASS pixel is correctColor | |
| 49 PASS pixel is [0, 0, 0, 255] | |
| 50 Testing depth = false | |
| 51 PASS getError was expected value: NO_ERROR : should be no errors | |
| 52 PASS gl = getWebGL(1, 1, { depth: false, stencil: false, antialias: false }, [ 0
, 0, 0, 1 ], 1, 0) is non-null. | |
| 53 PASS gl.getParameter(gl.DEPTH_BITS) == 0 is true | |
| 54 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 55 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 56 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 57 PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true | |
| 58 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 59 PASS pixel is correctColor | |
| 60 PASS pixel is [0, 0, 0, 255] | |
| 61 Testing stencil = true, depth = false | |
| 62 PASS getError was expected value: NO_ERROR : should be no errors | |
| 63 PASS gl = getWebGL(1, 1, { depth: false, stencil: true, antialias: false }, [ 0,
0, 0, 1 ], 1, 0) is non-null. | |
| 64 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 65 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 66 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 67 PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true | |
| 68 PASS gl.getParameter(gl.DEPTH_BITS) == 0 is true | |
| 69 PASS gl.getParameter(gl.STENCIL_BITS) >= 8 is true | |
| 70 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 71 PASS pixel is correctColor | |
| 72 PASS pixel is [0, 0, 0, 255] | |
| 73 Testing stencil = false, depth = false | |
| 74 PASS getError was expected value: NO_ERROR : should be no errors | |
| 75 PASS gl = getWebGL(1, 1, { depth: false, stencil: false, antialias: false }, [ 0
, 0, 0, 1 ], 1, 0) is non-null. | |
| 76 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 77 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 78 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 79 PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true | |
| 80 PASS gl.getParameter(gl.DEPTH_BITS) == 0 is true | |
| 81 PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true | |
| 82 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 83 PASS pixel is correctColor | |
| 84 PASS pixel is [0, 0, 0, 255] | |
| 85 Testing stencil = true, depth = true | |
| 86 PASS getError was expected value: NO_ERROR : should be no errors | |
| 87 PASS gl = getWebGL(1, 1, { depth: true, stencil: true, antialias: false }, [ 0,
0, 0, 1 ], 1, 0) is non-null. | |
| 88 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 89 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 90 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 91 PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true | |
| 92 PASS gl.getParameter(gl.DEPTH_BITS) >= 16 is true | |
| 93 PASS gl.getParameter(gl.STENCIL_BITS) >= 8 is true | |
| 94 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 95 PASS pixel is correctColor | |
| 96 PASS pixel is [0, 0, 0, 255] | |
| 97 Testing stencil = false, depth = true | |
| 98 PASS getError was expected value: NO_ERROR : should be no errors | |
| 99 PASS gl = getWebGL(1, 1, { depth: true, stencil: false, antialias: false }, [ 0,
0, 0, 1 ], 1, 0) is non-null. | |
| 100 PASS gl.getParameter(gl.RED_BITS) >= 8 is true | |
| 101 PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true | |
| 102 PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true | |
| 103 PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true | |
| 104 PASS gl.getParameter(gl.DEPTH_BITS) >= 16 is true | |
| 105 PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true | |
| 106 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 107 PASS pixel is correctColor | |
| 108 PASS pixel is [0, 0, 0, 255] | |
| 109 Testing antialias = true | |
| 110 PASS getError was expected value: NO_ERROR : should be no errors | |
| 111 PASS gl = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias
: true }, [ 0, 0, 0, 1 ], 1, 0) is non-null. | |
| 112 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 113 PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias | |
| 114 Testing antialias = false | |
| 115 PASS getError was expected value: NO_ERROR : should be no errors | |
| 116 PASS gl = getWebGL(2, 2, { depth: false, stencil: false, alpha: false, antialias
: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null. | |
| 117 PASS contextAttribs = gl.getContextAttributes() is non-null. | |
| 118 PASS pixel[0] != 255 && pixel[0] != 0 is contextAttribs.antialias | |
| 119 PASS successfullyParsed is true | |
| 120 | |
| 121 TEST COMPLETE | |
| 122 | |
| OLD | NEW |