https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 2a03903267f9b09cf4d8b616eb6c72c069ec3f2f authored by David Storey on 02 April 2018, 23:24:56 UTC
Add SVGAElement relList test
Tip revision: 2a03903
2d.transformation.scale.multiple.html
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.transformation.scale.multiple</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>

<h1>2d.transformation.scale.multiple</h1>
<p class="desc">Multiple scale()s combine</p>


<script>
var t = async_test("Multiple scale()s combine");
t.step(function() {

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

ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
ctx.scale(Math.sqrt(2), Math.sqrt(2));
ctx.scale(Math.sqrt(2), Math.sqrt(2));
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 50, 25);
_assertPixel(offscreenCanvas, 90,40, 0,255,0,255, "90,40", "0,255,0,255");

t.done();

});
</script>
back to top