https://github.com/web-platform-tests/wpt
Raw File
Tip revision: b69a3b60fb54003eceed768cb8d1e2a67d8a117e authored by Robert Ma on 16 March 2018, 15:52:02 UTC
Fix a typo in a resource file name (#9986)
Tip revision: b69a3b6
2d.fillRect.basic.html
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.fillRect.basic</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>

<h1>2d.fillRect.basic</h1>
<p class="desc">fillRect works</p>


<script>
var t = async_test("fillRect works");
t.step(function() {

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

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

t.done();

});
</script>
back to top