OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 "http://www.w3.org/TR/html4/loose.dtd"> |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <script> | 5 <script> |
6 function debug(str) { | 6 function debug(str) { |
7 var c = document.getElementById('console') | 7 var c = document.getElementById('console') |
8 c.appendChild(document.createTextNode(str + '\n')); | 8 c.appendChild(document.createTextNode(str + '\n')); |
9 } | 9 } |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 c4.translate(- i.width / 2, - i.height / 2); | 35 c4.translate(- i.width / 2, - i.height / 2); |
36 c4.fillRect(0, 0, i.width, i.height); | 36 c4.fillRect(0, 0, i.width, i.height); |
37 | 37 |
38 if (window.testRunner) { | 38 if (window.testRunner) { |
39 testRunner.notifyDone(); | 39 testRunner.notifyDone(); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 function runTests() { | 43 function runTests() { |
44 if (window.testRunner) { | 44 if (window.testRunner) { |
45 » testRunner.dumpAsText(true); | 45 » testRunner.dumpAsTextWithPixelResults(); |
46 testRunner.waitUntilDone(); | 46 testRunner.waitUntilDone(); |
47 } | 47 } |
48 | 48 |
49 i = new Image(); | 49 i = new Image(); |
50 i.onload = imageLoaded; | 50 i.onload = imageLoaded; |
51 i.src = 'resources/apple.gif'; | 51 i.src = 'resources/apple.gif'; |
52 } | 52 } |
53 | 53 |
54 </script> | 54 </script> |
55 </head> | 55 </head> |
56 <body onload="runTests();"> | 56 <body onload="runTests();"> |
57 <p>This tests that the Image JavaScript object works as expected when used in a
canvas. If the test is successful, the Apple logo should appear scaled, normal a
nd finally tiled in a circle.</p> | 57 <p>This tests that the Image JavaScript object works as expected when used in a
canvas. If the test is successful, the Apple logo should appear scaled, normal a
nd finally tiled in a circle.</p> |
58 <div><canvas id="canvas1" width="150" height="150"></canvas>Using drawImage.</di
v> | 58 <div><canvas id="canvas1" width="150" height="150"></canvas>Using drawImage.</di
v> |
59 <div><canvas id="canvas2" width="150" height="150"></canvas>Using drawImageFromR
ect.</div> | 59 <div><canvas id="canvas2" width="150" height="150"></canvas>Using drawImageFromR
ect.</div> |
60 <div><canvas id="canvas3" width="150" height="150"></canvas>Using ImagePattern.<
/div> | 60 <div><canvas id="canvas3" width="150" height="150"></canvas>Using ImagePattern.<
/div> |
61 <div><canvas id="canvas4" width="150" height="150"></canvas>Using ImagePattern a
nd rotation.</div> | 61 <div><canvas id="canvas4" width="150" height="150"></canvas>Using ImagePattern a
nd rotation.</div> |
62 | 62 |
63 <pre id="console"> | 63 <pre id="console"> |
64 </pre> | 64 </pre> |
65 </body> | 65 </body> |
66 </html> | 66 </html> |
OLD | NEW |