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

Unified Diff: LayoutTests/fast/canvas/alpha.js

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/alpha.js
diff --git a/LayoutTests/fast/canvas/alpha.js b/LayoutTests/fast/canvas/alpha.js
index c546db7716ef2ef322125648c29f10a4ad88737e..b93c0c22a8311321701a421f32a3f7d26a46fcc7 100644
--- a/LayoutTests/fast/canvas/alpha.js
+++ b/LayoutTests/fast/canvas/alpha.js
@@ -7,11 +7,15 @@ var canvas1 = document.getElementById("canvas1");
var canvas2 = document.getElementById("canvas2");
var canvas3 = document.getElementById("canvas3");
var canvas4 = document.getElementById("canvas4");
+var canvas5 = document.getElementById("canvas5");
+var canvas6 = document.getElementById("canvas6");
var ctx1 = canvas1.getContext("2d");
var ctx2 = canvas2.getContext("2d", {} );
var ctx3 = canvas3.getContext("2d", { alpha: false } );
var ctx4 = canvas4.getContext("2d", { alpha: true } );
+var ctx5 = canvas5.getContext("2d", { alpha: undefined } );
+var ctx6 = canvas6.getContext("2d", { alpha: null } );
shouldBe("ctx1.getContextAttributes().alpha", "true");
var imgData1 = ctx1.getImageData(0, 0, 1, 1);
@@ -48,3 +52,6 @@ shouldBe("imgData4.data[0]", "0");
shouldBe("imgData4.data[1]", "0");
shouldBe("imgData4.data[2]", "0");
shouldBe("imgData4.data[3]", "0");
+
+shouldBe("ctx5.getContextAttributes().alpha", "true");
+shouldBe("ctx6.getContextAttributes().alpha", "true");

Powered by Google App Engine
This is Rietveld 408576698