Index: LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html |
diff --git a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html |
index 1d97dfafffea6b47508cfeaad2040abd2bec4e4a..538f0defa531d4fff360cc197ca7b1e826d72b28 100644 |
--- a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html |
+++ b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html |
@@ -143,12 +143,13 @@ function testDefault() |
function testAlpha(alpha) |
{ |
debug("Testing alpha = " + alpha); |
- if (alpha) { |
- shouldBeNonNull("gl = getWebGL(1, 1, { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)"); |
- shouldBeTrue("gl.getParameter(gl.ALPHA_BITS) >= 8"); |
- } else { |
+ if (alpha == false) { |
shouldBeNonNull("gl = getWebGL(1, 1, { alpha: false, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)"); |
shouldBeTrue("gl.getParameter(gl.ALPHA_BITS) == 0"); |
+ } else { |
+ window.alpha = alpha; |
+ shouldBeNonNull("gl = getWebGL(1, 1, { alpha: alpha, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0)"); |
+ shouldBeTrue("gl.getParameter(gl.ALPHA_BITS) >= 8"); |
} |
shouldBeTrue("gl.getParameter(gl.RED_BITS) >= 8"); |
shouldBeTrue("gl.getParameter(gl.GREEN_BITS) >= 8"); |
@@ -157,7 +158,7 @@ function testAlpha(alpha) |
shouldBeTrue("gl.getParameter(gl.STENCIL_BITS) == 0"); |
shouldBeNonNull("contextAttribs = gl.getContextAttributes()"); |
- shouldBeTrue("contextAttribs.alpha == " + alpha); |
+ shouldBeTrue("contextAttribs.alpha == " + (alpha || alpha == undefined || alpha == null ? true : false)); |
var buf = new Uint8Array(1 * 1 * 4); |
gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, buf); |
@@ -338,6 +339,8 @@ function runTest() |
testDefault(); |
testAlpha(true); |
testAlpha(false); |
+ testAlpha(undefined); |
+ testAlpha(null); |
testDepth(true); |
testDepth(false); |
testStencilAndDepth(true, false); |