Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / PerformanceTests / Canvas / setFontAndMeasureText.html
blob9212cc0e22bc3276d18fff57867fe6334fb5520f
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/runner.js"></script>
5 <script>
7 var canvas = document.createElement("canvas");
8 var ctx = canvas.getContext("2d");
9 var font1 = "bold 15px Arial";
10 var font2 = "italic 20pt Calibri";
12 function doTest() {
13 ctx.font = font1;
14 ctx.measureText("a");
15 ctx.font = font2;
16 ctx.measureText("b");
19 // Warm up the caches
20 doTest();
22 PerfTestRunner.measureRunsPerSecond({
23 description: "Measures performance of setting the current font and measuring text on a canvas.",
24 run: doTest
25 });
26 </script>
27 </body>
28 </html>