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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html

Issue 1756963003: Add "premultiply" in ImageBitmapOptions enum PremultiplyAlpha (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change parseOptions Created 4 years, 10 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: third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html
index dd8d311af442f7a5ccc153040e7d803224a4f78d..d7a5bdc7bb7d89e4b71ea9809da1896853c4f5d2 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html
@@ -163,10 +163,10 @@ function loaded() {
// check all elements
elements = [image, aCanvas, d, testBitmap, blob];
imageOrientationOptions = ["none", "flipY", "invalid"];
- premultiplyAlphaOptions = ["default", "none", "invalid"];
- optionIndexArray = [[0, 0], [0, 1], [0, 2],
- [1, 0], [1, 1], [1, 2],
- [2, 0], [2, 1], [2, 2]];
+ premultiplyAlphaOptions = ["default", "none", "premultiply", "invalid"];
+ optionIndexArray = [[0, 0], [0, 1], [0, 2], [0, 3],
+ [1, 0], [1, 1], [1, 2], [1, 3],
+ [2, 0], [2, 1], [2, 2], [2, 3]];
// wait for callback to finish before each check to ensure synchronous behavior
nextCheck(0, 0);
}
@@ -207,8 +207,7 @@ function nextCheck(elementIndex, optionIndex) {
nextCheck(elementIndex, optionIndex + 1);
}, function() {
// when the options are invalid, we expect the promise to be rejected.
- if ((imageOrientationOptions[optionIndex1] != "none" && imageOrientationOptions[optionIndex1] != "flipY") ||
- (premultiplyAlphaOptions[optionIndex2] != "default" && premultiplyAlphaOptions[optionIndex2] != "none")) {
+ if (imageOrientationOptions[optionIndex1] == "invalid" || premultiplyAlphaOptions[optionIndex2] == "invalid") {
testPassed("createImageBitmap with invalid options are rejected");
if (optionIndex == optionIndexArray.length - 1)
nextCheck(elementIndex + 1, 0);

Powered by Google App Engine
This is Rietveld 408576698