blob: aa67d28fccc7e7e50d7806593d13d37385e2ee0b [file] [log] [blame]
This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
Test: ../../resources/webgl_test_files/conformance/context/context-attributes-alpha-depth-stencil-antialias.html
[ 1: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 2: PASS ] gl = getWebGL(1, 1, null, [ 0, 0, 0, 0 ], 1, 0) is non-null.
[ 3: PASS ] gl.getContextAttributes().stencil is false
[ 4: PASS ] gl.getParameter(gl.STENCIL_BITS) == 0 is true
[ 5: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 6: PASS ] gl = getWebGL(1, 1, { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
[ 7: PASS ] gl.getParameter(gl.ALPHA_BITS) >= 8 is true
[ 8: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 9: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 10: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 11: PASS ] gl.getParameter(gl.DEPTH_BITS) == 0 is true
[ 12: PASS ] gl.getParameter(gl.STENCIL_BITS) == 0 is true
[ 13: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 14: PASS ] contextAttribs.alpha == true is true
[ 15: PASS ] should be 0,0,0,0
[ 16: PASS ] should be 127,127,127,127
[ 17: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 18: PASS ] gl = getWebGL(1, 1, { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
[ 19: FAIL ] gl.getParameter(gl.ALPHA_BITS) == 0 should be true. Was false.
[ 20: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 21: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 22: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 23: PASS ] gl.getParameter(gl.DEPTH_BITS) == 0 is true
[ 24: PASS ] gl.getParameter(gl.STENCIL_BITS) == 0 is true
[ 25: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 26: PASS ] contextAttribs.alpha == false is true
[ 27: FAIL ] should be 0,0,0,255 at (0, 0) expected: 0,0,0,255 was 0,0,0,0
[ 28: PASS ] should be 127,127,127,127
[ 29: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 30: PASS ] gl = getWebGL(1, 1, { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 31: PASS ] gl.getParameter(gl.DEPTH_BITS) >= 16 is true
[ 32: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 33: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 34: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 35: PASS ] gl.getParameter(gl.ALPHA_BITS) >= 8 is true
[ 36: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 37: PASS ] should be 0,0,0,255
[ 38: PASS ] should be 0,0,0,255
[ 39: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 40: PASS ] gl = getWebGL(1, 1, { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 41: PASS ] gl.getParameter(gl.DEPTH_BITS) == 0 is true
[ 42: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 43: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 44: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 45: PASS ] gl.getParameter(gl.ALPHA_BITS) >= 8 is true
[ 46: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 47: PASS ] should be 255,0,0,255
[ 48: PASS ] should be 0,0,0,255
[ 49: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 50: PASS ] gl = getWebGL(1, 1, { depth: false, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 51: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 52: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 53: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 54: PASS ] gl.getParameter(gl.ALPHA_BITS) >= 8 is true
[ 55: PASS ] gl.getParameter(gl.DEPTH_BITS) == 0 is true
[ 56: PASS ] gl.getParameter(gl.STENCIL_BITS) >= 8 is true
[ 57: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 58: PASS ] should be 0,0,0,255
[ 59: PASS ] should be 0,0,0,255
[ 60: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 61: PASS ] gl = getWebGL(1, 1, { depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 62: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 63: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 64: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 65: PASS ] gl.getParameter(gl.ALPHA_BITS) >= 8 is true
[ 66: PASS ] gl.getParameter(gl.DEPTH_BITS) == 0 is true
[ 67: PASS ] gl.getParameter(gl.STENCIL_BITS) == 0 is true
[ 68: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 69: PASS ] should be 255,0,0,255
[ 70: PASS ] should be 0,0,0,255
[ 71: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 72: PASS ] gl = getWebGL(1, 1, { depth: true, stencil: true, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 73: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 74: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 75: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 76: PASS ] gl.getParameter(gl.ALPHA_BITS) >= 8 is true
[ 77: PASS ] gl.getParameter(gl.DEPTH_BITS) >= 16 is true
[ 78: PASS ] gl.getParameter(gl.STENCIL_BITS) >= 8 is true
[ 79: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 80: PASS ] should be 0,0,0,255
[ 81: PASS ] should be 0,0,0,255
[ 82: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 83: PASS ] gl = getWebGL(1, 1, { depth: true, stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 84: PASS ] gl.getParameter(gl.RED_BITS) >= 8 is true
[ 85: PASS ] gl.getParameter(gl.GREEN_BITS) >= 8 is true
[ 86: PASS ] gl.getParameter(gl.BLUE_BITS) >= 8 is true
[ 87: PASS ] gl.getParameter(gl.ALPHA_BITS) >= 8 is true
[ 88: PASS ] gl.getParameter(gl.DEPTH_BITS) >= 16 is true
[ 89: PASS ] gl.getParameter(gl.STENCIL_BITS) == 0 is true
[ 90: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 91: PASS ] should be 255,0,0,255
[ 92: PASS ] should be 0,0,0,255
[ 93: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 94: PASS ] gl = getWebGL(3, 3, { depth: false, stencil: false, alpha: false, antialias: true }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 95: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 96: PASS ] redChannels[1] == 255 && redChannels[2] == 0 is true
[ 97: PASS ] redChannels[0] != 255 && redChannels[0] != 0 is contextAttribs.antialias
[ 98: PASS ] getError was expected value: NO_ERROR : should be no errors
[ 99: PASS ] gl = getWebGL(3, 3, { depth: false, stencil: false, alpha: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.
[ 100: PASS ] contextAttribs = gl.getContextAttributes() is non-null.
[ 101: PASS ] redChannels[1] == 255 && redChannels[2] == 0 is true
[ 102: PASS ] redChannels[0] != 255 && redChannels[0] != 0 is contextAttribs.antialias
[ 103: PASS ] successfullyParsed is true
[ FAIL ] 2 failures reported