blob: 11f8bcc4fd8060317349099514fed235307911d4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../resources/runner.js"></script>
<script>
var canvas = document.createElement("canvas");
var ctx = canvas.getContext("2d");
var font1 = "bold 15px Arial";
function doTest() {
ctx.font = font1;
ctx.measureText("a");
}
// Warm up the caches
doTest();
PerfTestRunner.measureRunsPerSecond({
description: "Measures performance of setting the current font and measuring text using the same font over and over.",
run: doTest
});
</script>
</body>
</html>