Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-image-source-with-worker.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-image-source-with-worker.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-image-source-with-worker.html |
index 642b0a4d1f42a92c1ca73ff70bb9871e7de48434..e9d148b95ed5c82c3a7b5eaf77a13acecd83eafc 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-image-source-with-worker.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-image-source-with-worker.html |
@@ -9,9 +9,11 @@ self.onmessage = function(msg) { |
ctx = msg.data.getContext('2d'); |
ctx.fillStyle = '#0f0'; |
ctx.fillRect(0, 0, 100, 100); |
- ctx.commit(); |
+ var p = ctx.commit(); |
- self.postMessage("done"); |
+ p.then(function() { |
+ self.postMessage("done"); |
+ }); |
}; |
</script> |
@@ -52,4 +54,4 @@ function verifyImage(image, description) { |
assert_array_equals(pixel, [0, 255, 0, 255], description); |
}); |
} |
-</script> |
+</script> |