Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: tools/perf/page_sets/tough_canvas_cases/canvas-font-cycler.html

Issue 1202313002: Adding a canvas telemetry test that uses a large font set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/page_sets/tough_canvas_cases.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <canvas id='c'></canvas>
5 <script>
6 var fontNameList = ["Palatino Linotype", "Georgia", "Times New Roman", "Arial", "Arial Black", "cursive", "Impact", "Tahoma", "Helvetica", "Verdana", "Geneva", "sans-serif", "Courier", "Monaco"]
7 var fontStyleList = ["", "italic", "oblique"];
8 var fontWeightList = ["", "bold", "bolder", "lighter"];
9 var fontSizeList = ["10pt", "15pt", "20pt", "small", "large", "15px", "20mm"];
10
11 var canvas = document.getElementById("c");
12 var ctx = canvas.getContext("2d");
13
14 function doFrame() {
15 var fontString;
16 canvas.width = canvas.width;
17 fontNameList.forEach(function(fontName) {
18 fontStyleList.forEach(function(fontStyle) {
19 fontWeightList.forEach(function(fontWeight) {
20 fontSizeList.forEach(function(fontSize) {
21 ctx.font = fontStyle + " " + fontWeight + " " + fontSize + " " + fontName;
22 // Use the font to make sure the font is completely resolved (has no pending lazy inits)
23 ctx.fillText("Test", 0, 50);
24 });
25 });
26 });
27 });
28 requestAnimationFrame(doFrame);
29 }
30 requestAnimationFrame(doFrame);
31 </script>
32 </body>
33 </html>
OLDNEW
« no previous file with comments | « tools/perf/page_sets/tough_canvas_cases.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698