https://github.com/web-platform-tests/wpt
Raw File
Tip revision: d4b686df9fe6933c4c37986c9c3840eba5aad2ef authored by Joshua Bell on 06 April 2018, 19:47:51 UTC
Cookie Store: Tentatively deflake special names test
Tip revision: d4b686d
2d.strokeRect.path.html
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.strokeRect.path</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>

<h1>2d.strokeRect.path</h1>
<p class="desc">strokeRect does not affect the current path</p>


<script>
var t = async_test("strokeRect does not affect the current path");
t.step(function() {

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

ctx.beginPath();
ctx.rect(0, 0, 100, 50);
ctx.strokeStyle = '#f00';
ctx.lineWidth = 5;
ctx.strokeRect(0, 0, 16, 16);
ctx.fillStyle = '#0f0';
ctx.fill();
_assertPixel(offscreenCanvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");

t.done();

});
</script>
back to top