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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/offscreen-canvas/pixel-manipulation/2d.imageData.put.unchanged.worker.js

Issue 2553473002: Add offscreen-canvas to the list of wpt directories to skip. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // DO NOT EDIT! This test has been generated by tools/gentest.py.
2 // OffscreenCanvas test in a worker:2d.imageData.put.unchanged
3 // Description:putImageData(getImageData(...), ...) has no effect
4 // Note:
5
6 importScripts("/resources/testharness.js");
7 importScripts("/common/canvas-tests.js");
8
9 var t = async_test("putImageData(getImageData(...), ...) has no effect");
10 t.step(function() {
11
12 var offscreenCanvas = new OffscreenCanvas(100, 50);
13 var ctx = offscreenCanvas.getContext('2d');
14
15 var i = 0;
16 for (var y = 0; y < 16; ++y) {
17 for (var x = 0; x < 16; ++x, ++i) {
18 ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (M ath.floor(i*23.3) % 256) + ',' + (i/256) + ')';
19 ctx.fillRect(x, y, 1, 1);
20 }
21 }
22 var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
23 var olddata = [];
24 for (var i = 0; i < imgdata1.data.length; ++i)
25 olddata[i] = imgdata1.data[i];
26 ctx.putImageData(imgdata1, 0.1, 0.2);
27 var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
28 for (var i = 0; i < imgdata2.data.length; ++i) {
29 _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2. data[\""+(i)+"\"]");
30 }
31
32 t.done();
33
34 });
35 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698