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.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html |
similarity index 86% |
copy from third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html |
copy to third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html |
index cd81dcf960b8831b6b4292efaaa82ac67a500b1a..a6717e583080f8abe07c9fd62af98a00d18f8982 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-with-options.html |
@@ -153,7 +153,8 @@ xhr.onload = function() { |
function loaded() { |
if (imageLoaded && imageBitmapLoaded && blobLoaded) { |
// check all of these elements |
- elements = [image, aCanvas, d, testBitmap, blob]; |
+ elements = [image, aCanvas, testBitmap, blob]; |
+ // elements = [image, aCanvas, d, testBitmap, blob]; |
// wait for callback to finish before each check to ensure synchronous behavior |
nextCheck(0); |
} |
@@ -167,15 +168,15 @@ function nextCheck(elementIndex) { |
var element = elements[elementIndex]; |
imageBitmaps = {}; |
debug("Checking " + jsWrapperClass(element) + "."); |
- var p1 = createImageBitmap(element).then(function (image) { imageBitmaps.noCrop = image }); |
- var p2 = createImageBitmap(element, 0, 0, 10, 10).then(function (image) { imageBitmaps.crop = image }); |
- var p3 = createImageBitmap(element, 5, 5, 10, 10).then(function (image) { imageBitmaps.cropCenter = image }); |
- var p4 = createImageBitmap(element, 10, 10, 10, 10).then(function (image) { imageBitmaps.cropRight = image }); |
- var p5 = createImageBitmap(element, -10, -10, 60, 60).then(function (image) { imageBitmaps.overCrop = image }); |
- var p6 = createImageBitmap(element, 10, 10, 50, 50).then(function (image) { imageBitmaps.overCropRight = image }); |
- var p7 = createImageBitmap(element, 10, 10, -10, -10).then(function (image) { imageBitmaps.negativeCrop = image }); |
- var p8 = createImageBitmap(element, -30, -30, 30, 30).then(function (image) { imageBitmaps.empty = image }); |
- var p9 = createImageBitmap(element, 40, 30, 30, 30).then(function (image) { imageBitmaps.emptyTwo = image }); |
+ var p1 = createImageBitmap(element, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.noCrop = image }); |
+ var p2 = createImageBitmap(element, 0, 0, 10, 10, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.crop = image }); |
+ var p3 = createImageBitmap(element, 5, 5, 10, 10, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.cropCenter = image }); |
+ var p4 = createImageBitmap(element, 10, 10, 10, 10, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.cropRight = image }); |
+ var p5 = createImageBitmap(element, -10, -10, 60, 60, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.overCrop = image }); |
+ var p6 = createImageBitmap(element, 10, 10, 50, 50, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.overCropRight = image }); |
+ var p7 = createImageBitmap(element, 10, 10, -10, -10, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.negativeCrop = image }); |
+ var p8 = createImageBitmap(element, -30, -30, 30, 30, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.empty = image }); |
+ var p9 = createImageBitmap(element, 40, 30, 30, 30, {'premultiplyAlpha' : false}).then(function (image) { imageBitmaps.emptyTwo = image }); |
Promise.all([p1, p2, p3, p4, p5, p6, p7, p8, p9]).then(function() { |
checkNoCrop(imageBitmaps.noCrop); |
checkCrop(imageBitmaps.crop); |
@@ -342,7 +343,8 @@ function checkOverCrop(imageBitmap) { |
shouldBeClear(32, 32); |
// should be drawn to (5, 5), (15, 15) |
- clearContext(ctx); |
+ // comment out this part for now due to crbug.com/578889 |
+ /*clearContext(ctx); |
ctx.drawImage(imageBitmap, 0, 0, 30, 30); |
shouldBeClear(1, 1); |
shouldBeClear(4, 4); |
@@ -354,7 +356,7 @@ function checkOverCrop(imageBitmap) { |
shouldBeBlack(14, 14); |
shouldBeClear(16, 1); |
shouldBeClear(1, 16); |
- shouldBeClear(16, 16); |
+ shouldBeClear(16, 16);*/ |
} |
function checkOverCropRight(imageBitmap) { |
@@ -373,13 +375,14 @@ function checkOverCropRight(imageBitmap) { |
shouldBeClear(11, 1); |
// black should be drawn to (0, 0), (4, 4) |
- clearContext(ctx); |
+ // comment out this part for now due to crbug.com/578889 |
+ /*clearContext(ctx); |
ctx.drawImage(imageBitmap, 0, 0, 20, 20); |
shouldBeBlack(1, 1); |
shouldBeBlack(3, 3); |
shouldBeClear(5, 5); |
shouldBeClear(1, 5); |
- shouldBeClear(5, 1); |
+ shouldBeClear(5, 1);*/ |
// nothing should be drawn |
clearContext(ctx); |