https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7a3894d75f6a5ebb50287e0af52744d5dd0df10b authored by Luke Bjerring on 17 May 2018, 17:45:58 UTC
Include attribute types in dep list
Tip revision: 7a3894d
2d.fillStyle.parse.rgb-percent.html
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.fillStyle.parse.rgb-percent</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>

<h1>2d.fillStyle.parse.rgb-percent</h1>
<p class="desc"></p>

<p class="notes">CSS3 Color says "The integer value 255 corresponds to 100%". (In particular, it is not 254...)
<script>
var t = async_test("");
t.step(function() {

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


ctx.fillStyle = '#f00';
ctx.fillStyle = 'rgb(0% ,100% ,0%)';
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