Fix OOP <webview> resize and autosize.
[chromium-blink-merge.git] / tools / perf / page_sets / tough_canvas_cases / canvas-font-cycler.html
blob52fbfee5054660049723702ab200bfcc66a0f87c
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <canvas id='c'></canvas>
5 <script>
6 var fontNameList = ["Palatino Linotype", "Times New Roman", "Arial", "sans-serif"]
7 var fontWeightList = ["", "bold", "bolder", "lighter"];
8 var fontSizeList = ["10pt", "15pt", "20pt", "small", "large", "15px", "20mm"];
10 var canvas = document.getElementById("c");
11 var ctx = canvas.getContext("2d");
13 function doFrame() {
14 canvas.width = canvas.width;
15 for (var i = 0; i < 20; i++) {
16 fontNameList.forEach(function(fontName) {
17 fontWeightList.forEach(function(fontWeight) {
18 fontSizeList.forEach(function(fontSize) {
19 ctx.font = fontWeight + " " + fontSize + " " + fontName;
20 // Use the font to make sure the font is completely resolved (has no pending lazy inits)
21 ctx.fillText("Test", 0, 50);
22 });
23 });
24 });
26 requestAnimationFrame(doFrame);
28 requestAnimationFrame(doFrame);
29 </script>
30 </body>
31 </html>