| OLD | NEW |
| 1 <style> | 1 <style> |
| 2 @font-face { | 2 @font-face { |
| 3 font-family: no-such-font; | 3 font-family: no-such-font; |
| 4 src: url(no-such-file.ttf); | 4 src: url(no-such-file.ttf); |
| 5 } | 5 } |
| 6 </style> | 6 </style> |
| 7 <canvas id="target"></canvas> | 7 <canvas id="target"></canvas> |
| 8 <script> | 8 <script> |
| 9 canvas = document.getElementById("target"); | 9 canvas = document.getElementById("target"); |
| 10 ctx = canvas.getContext('2d'); | 10 ctx = canvas.getContext('2d'); |
| 11 ctx.font = "100px no-such-font, ahem"; | 11 ctx.font = "100px no-such-font, ahem"; |
| 12 ctx.fillStyle = "red"; | 12 ctx.fillStyle = "red"; |
| 13 ctx.fillText("B", 0, 100); | 13 ctx.fillText("B", 0, 100); |
| 14 ctx.fillStyle = "green"; | 14 ctx.fillStyle = "green"; |
| 15 canvas.parentNode.removeChild(canvas); | 15 ctx.fillText("A", 0, 100); |
| 16 if (window.testRunner) { | |
| 17 testRunner.dumpAsTextWithPixelResults(); | |
| 18 testRunner.waitUntilDone(); | |
| 19 » } | |
| 20 setTimeout(function() | |
| 21 { | |
| 22 ctx.fillText("A", 0, 100); | |
| 23 document.body.appendChild(canvas); | |
| 24 if (window.testRunner) | |
| 25 testRunner.notifyDone(); | |
| 26 }, 50); | |
| 27 </script> | 16 </script> |
| OLD | NEW |