https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 5977168f5485cbb193415ffd1b893d824d097186 authored by Luke Bjerring on 23 May 2018, 13:38:10 UTC
Fix pointerlock with add_dependency_idls
Tip revision: 5977168
2d.fillRect.zero.worker.js
// DO NOT EDIT! This test has been generated by tools/gentest.py.
// OffscreenCanvas test in a worker:2d.fillRect.zero
// Description:fillRect of zero pixels has no effect
// Note:

importScripts("/resources/testharness.js");
importScripts("/common/canvas-tests.js");

var t = async_test("fillRect of zero pixels has no effect");
t.step(function() {

var offscreenCanvas = new OffscreenCanvas(100, 50);
var ctx = offscreenCanvas.getContext('2d');

ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 0);
ctx.fillRect(0, 0, 0, 50);
ctx.fillRect(0, 0, 0, 0);
_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");

t.done();

});
done();
back to top