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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html

Issue 2139353003: Return a transparent black ImageBitmap when mailbox is invalid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html b/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html
index b2b97e3fccefc27de97b145e707c06d9114951a4..862cc195bd3acfdcc40c1a71e771dae1a8e53af5 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap.html
@@ -1,7 +1,8 @@
<!DOCTYPE html>
<html>
<body>
-<canvas id='output' width = '100' height = '100'></canvas>
+<canvas id='output1' width = '100' height = '100'></canvas>
+<canvas id='output2' width = '100' height = '100'></canvas>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
@@ -13,11 +14,18 @@ var aCanvas = new OffscreenCanvas(width, height);
var gl = aCanvas.getContext('webgl');
gl.clearColor(1.0, 0.0, 0.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
-var image = aCanvas.transferToImageBitmap();
+var image1 = aCanvas.transferToImageBitmap();
+gl.clearColor(0.0, 0.0, 1.0, 1.0);
+gl.clear(gl.COLOR_BUFFER_BIT);
+var image2 = aCanvas.transferToImageBitmap();
+
+var canvas1 = document.getElementById("output1");
+var ctx1 = canvas1.getContext('bitmaprenderer');
+ctx1.transferFromImageBitmap(image1);
-var canvas = document.getElementById("output");
-var ctx = canvas.getContext('bitmaprenderer');
-ctx.transferFromImageBitmap(image);
+var canvas2 = document.getElementById('output2');
+var ctx2 = canvas2.getContext('bitmaprenderer');
+ctx2.transferFromImageBitmap(image2);
if (window.testRunner) {
testRunner.notifyDone();
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-transferToImageBitmap-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698