https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 9c9417e5255836be1d428e82b48b92070258efd8 authored by Tsuyoshi Horo on 02 April 2018, 03:41:31 UTC
Set SkipServiceWorker flag for synchronous loads from the main thread.
Tip revision: 9c9417e
2d.path.moveTo.newsubpath.worker.js
// DO NOT EDIT! This test has been generated by tools/gentest.py.
// OffscreenCanvas test in a worker:2d.path.moveTo.newsubpath
// Description:
// Note:

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

var t = async_test("");
t.step(function() {

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

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

t.done();

});
done();
back to top