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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html

Issue 1844083002: Color parsing in CSSParser: avoid using ColorValueCache on worker thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compress layout tests; TODO bug Created 4 years, 9 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/OffscreenCanvas-fillRect-in-worker-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/OffscreenCanvas-fillRect-in-worker.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html
index 08a110f058efbf23cb8c92db7a70a54a817f1a87..5d078026f778cfa6c19aa3d3dec3b55090ea94c8 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker.html
@@ -1,16 +1,30 @@
<!DOCTYPE html>
<html>
<body>
-<canvas id='output' width='100' height='100' style='background:red'></canvas>
-
+<canvas id='output1' width='100' height='100' style='background:red'></canvas>
+<canvas id='output2' width='100' height='100' style='background:blue'></canvas>
Justin Novosad 2016/03/31 21:52:12 Just use red for all the backgrounds. Red is the u
+<canvas id='output3' width='100' height='100' style='background:yellow'></canvas>
<script id='myWorker' type='text/worker'>
self.onmessage = function(e) {
var aCanvas = new OffscreenCanvas(100, 100);
var ctx = aCanvas.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, 100, 100);
- var image = aCanvas.transferToImageBitmap();
- self.postMessage(image, [image]);
+ var image1 = aCanvas.transferToImageBitmap();
+
+ ctx.fillStyle = '#D359FE';
+ ctx.fillRect(0, 0, 100, 100);
+ var image2 = aCanvas.transferToImageBitmap();
+
+ ctx.fillStyle = 'rgb(150,250,100)';
+ ctx.fillRect(0, 0, 100, 100);
+ var image3 = aCanvas.transferToImageBitmap();
+
+ self.postMessage(
+ { i1: image1,
+ i2: image2,
+ i3: image3 },
+ [ image1, image2, image3 ]);
};
</script>
@@ -21,8 +35,13 @@ if (window.testRunner) {
var blob = new Blob([document.getElementById('myWorker').textContent]);
var worker = new Worker(URL.createObjectURL(blob));
worker.addEventListener('message', msg => {
- var outputCtx = document.getElementById('output').getContext('imagebitmap');
- outputCtx.transferImageBitmap(msg.data);
+ var outputCtx1 = document.getElementById('output1').getContext('imagebitmap');
+ outputCtx1.transferImageBitmap(msg.data.i1);
+ var outputCtx2 = document.getElementById('output2').getContext('imagebitmap');
+ outputCtx2.transferImageBitmap(msg.data.i2);
+ var outputCtx3 = document.getElementById('output3').getContext('imagebitmap');
+ outputCtx3.transferImageBitmap(msg.data.i3);
+
if (window.testRunner) {
testRunner.notifyDone();
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-fillRect-in-worker-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698