blob: bcd1e9bdd44d84f6f452908dd5d5825d80563dc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<canvas id="mycanvas" width="512" height="512"></canvas>
<script>
if (window.testRunner)
testRunner.dumpAsText()
onload = function()
{
var canvas = document.getElementById('mycanvas');
var ctx = canvas.getContext('2d');
ctx.fillStyle = "rgb(255,165,0)";
ctx.fillRect(0, 0, 512, 512);
ctx.save();
canvas.width = 256;
ctx.fillStyle = "rgb(255,165,0)";
ctx.fillRect(0, 0, 256, 512);
document.body.appendChild(document.createElement("p")).appendChild(document.createTextNode("If we got this far without an assertion, this test passed."));
};
</script>
</body>
</html>
|