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

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

Issue 2570613002: Add OffscreenCanvas to ImageBitmapSource union typedef (Closed)
Patch Set: build fix Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-invalid-args-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmapSource.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmapSource.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmapSource.html
new file mode 100644
index 0000000000000000000000000000000000000000..cf1396788b0a1de0268d14466e47a227d55ab52a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-ImageBitmapSource.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+async_test(t => {
+ var offscreen = new OffscreenCanvas(50, 50);
+ var ctx = offscreen.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ createImageBitmap(offscreen).then(image => {
+ var output = new OffscreenCanvas(50, 50);
+ var outCtx = offscreen.getContext('2d');
+ outCtx.drawImage(image, 0, 0);
+ var pixel = outCtx.getImageData(0, 0, 1, 1).data;
+ t.step(function() {
+ assert_array_equals(pixel, [0, 255, 0, 255]);
+ });
+ t.done();
+ });
+}, "Call createImageBitmap on OffscreenCanvas with 2D context");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-invalid-args-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698