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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-MessageChannel-transfer.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-MessageChannel-transfer.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-MessageChannel-transfer.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-MessageChannel-transfer.html
index 6e321e012a3e457effebd91bddbebc11edaf3941..5b2b908f41be23f77b04342dc0a2e4658a966467 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-MessageChannel-transfer.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-MessageChannel-transfer.html
@@ -12,16 +12,20 @@ async_test(t => {
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 10, 10);
ctx.commit();
- setTimeout(function() { // synchronization barrier to allow commit to propagate
- var canvas2 = document.createElement('canvas');
- canvas2.width = canvas2.height = 10;
- var ctx2 = canvas2.getContext('2d');
- ctx2.drawImage(canvas, 0, 0);
- var pixel = ctx2.getImageData(0, 0, 1, 1).data;
- t.step(function() {
- assert_array_equals(pixel, [0, 255, 0, 255]);
- });
- t.done();
+ // TODO(junov): Use the Promise returned by commit to schedule after the
+ // commit. (crbug.com/709484)
+ setTimeout(function() {
+ setTimeout(function() {
+ var canvas2 = document.createElement('canvas');
+ canvas2.width = canvas2.height = 10;
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.drawImage(canvas, 0, 0);
+ var pixel = ctx2.getImageData(0, 0, 1, 1).data;
+ t.step(function() {
+ assert_array_equals(pixel, [0, 255, 0, 255]);
+ });
+ t.done();
+ }, 0);
}, 0);
}
channel.port1.postMessage(offscreen, [offscreen]);

Powered by Google App Engine
This is Rietveld 408576698