Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / canvas-font-speed.html
blobfba6bce070a2a5dfbc948a8b3ed21822002b6573
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <title>Canvas 2d Context Font Property Speed</title>
5 </head>
6 <body>
7 <canvas id='thecanvas' height=100 width=100/>
8 <script>
9 var canvas = document.getElementById('thecanvas');
10 var context = canvas.getContext('2d');
11 var t0 = Date.now();
12 for (var i = 0; i < 1000; i++) {
13 context.font = 'bold 13px Arial';
15 alert('Elapsed for 1000 font settings: ' + (Date.now() - t0));
16 </script>
17 </body>
18 </html>