gecko/content/canvas/test/test_2d.scaled.html

28 lines
775 B
HTML
Raw Normal View History

<!DOCTYPE HTML>
<title>Canvas test: 2d.scaled</title>
<!-- Testing: CSS-scaled canvases get drawn correctly -->
<script src="/MochiKit/packed.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
<body>
<canvas id="c" width="50" height="25" style="width: 100px; height: 50px"><p class="fallback">FAIL (fallback content)</p></canvas>
<script>
SimpleTest.waitForExplicitFinish();
MochiKit.DOM.addLoadEvent(function () {
var canvas = document.getElementById('c');
var ctx = canvas.getContext('2d');
ctx.fillStyle = '#00f';
ctx.fillRect(0, 0, 50, 25);
ctx.fillStyle = '#0ff';
ctx.fillRect(0, 0, 25, 10);
todo(false, "test completed successfully"); // (Bug 483989)
SimpleTest.finish();
});
</script>