Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt

Issue 290143007: canvas.getContext with alpha:undefined should behave like alpha:true (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: test expectations Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
diff --git a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
index a6862a9194d6d12dd220b607f530bde92a35561b..1c2b3abd77622f432f4a0d793cc41f01487a0ccf 100644
--- a/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
+++ b/LayoutTests/fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt
@@ -12,7 +12,7 @@ PASS gl.getContextAttributes().stencil is false
PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true
Testing alpha = true
PASS getError was expected value: NO_ERROR : should be no errors
-PASS gl = getWebGL(1, 1, { alpha: true, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
+PASS gl = getWebGL(1, 1, { alpha: alpha, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true
PASS gl.getParameter(gl.RED_BITS) >= 8 is true
PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true
@@ -36,6 +36,32 @@ PASS contextAttribs = gl.getContextAttributes() is non-null.
PASS contextAttribs.alpha == false is true
PASS pixel is correctColor
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
+Testing alpha = undefined
+PASS getError was expected value: NO_ERROR : should be no errors
+PASS gl = getWebGL(1, 1, { alpha: alpha, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
+PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true
+PASS gl.getParameter(gl.RED_BITS) >= 8 is true
+PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true
+PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true
+PASS gl.getParameter(gl.DEPTH_BITS) == 0 is true
+PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true
+PASS contextAttribs = gl.getContextAttributes() is non-null.
+PASS contextAttribs.alpha == true is true
+PASS pixel is correctColor
+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
+Testing alpha = null
+PASS getError was expected value: NO_ERROR : should be no errors
+PASS gl = getWebGL(1, 1, { alpha: alpha, depth: false, stencil: false, antialias: false }, [ 0, 0, 0, 0 ], 1, 0) is non-null.
+PASS gl.getParameter(gl.ALPHA_BITS) >= 8 is true
+PASS gl.getParameter(gl.RED_BITS) >= 8 is true
+PASS gl.getParameter(gl.GREEN_BITS) >= 8 is true
+PASS gl.getParameter(gl.BLUE_BITS) >= 8 is true
+PASS gl.getParameter(gl.DEPTH_BITS) == 0 is true
+PASS gl.getParameter(gl.STENCIL_BITS) == 0 is true
+PASS contextAttribs = gl.getContextAttributes() is non-null.
+PASS contextAttribs.alpha == true is true
+PASS pixel is correctColor
+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
Testing depth = true
PASS getError was expected value: NO_ERROR : should be no errors
PASS gl = getWebGL(1, 1, { stencil: false, antialias: false }, [ 0, 0, 0, 1 ], 1, 0) is non-null.

Powered by Google App Engine
This is Rietveld 408576698