Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html |
index 398869ec2b225f6233a635a05c968309ac7079c8..3a6e3c954f1df9bab74488ba2bcfe8b231afe57f 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html |
@@ -25,18 +25,20 @@ async_test(function(t) { |
assert_array_equals(pixel, expectedValue, "Verify that commit() is not synchronous."); |
}); |
- // The call to setTimeout acts as a synchronization barrier to guarantee that |
- // the commit has propagated. |
+ // TODO(junov): Use the Promise returned by commit to schedule after the |
+ // commit. (crbug.com/709484) |
setTimeout(function() { |
- createImageBitmap(canvas).then(image => { |
- testCtx.drawImage(image, 0, 0); |
- t.step( function() { |
- var pixel = testCtx.getImageData(0, 0, 1, 1).data; |
- var expectedValue = [0, 255, 0, 255]; |
- assert_array_equals(pixel, expectedValue, "Verify that async update of placeholder propagated through createImageData"); |
+ setTimeout(function() { |
+ createImageBitmap(canvas).then(image => { |
+ testCtx.drawImage(image, 0, 0); |
+ t.step( function() { |
+ var pixel = testCtx.getImageData(0, 0, 1, 1).data; |
+ var expectedValue = [0, 255, 0, 255]; |
+ assert_array_equals(pixel, expectedValue, "Verify that async update of placeholder propagated through createImageData"); |
+ }); |
+ t.done(); |
}); |
- t.done(); |
- }); |
+ }, 0); |
}, 0); |
}); |
}, "Test whether createImageBitmap on a placeholder canvas captures the image committed to the associated OffscreenCanvas."); |