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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html

Issue 2738773004: No longer clamp setTimeout(..., 0) to 1ms. (Closed)
Patch Set: update webgl2 conformance expectations as well Created 3 years, 8 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/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.");

Powered by Google App Engine
This is Rietveld 408576698