Test for bug 667947. r=dbaron

This commit is contained in:
Chris Jones 2011-06-28 17:35:39 -07:00
parent 2d44f17e62
commit 796f9a5bc4
3 changed files with 36 additions and 0 deletions

View File

@ -41,6 +41,8 @@ asserts-if(cocoaWidget,0-2) == size-change-1.html size-change-1-ref.html
fails-if(Android) != text-font-lang.html text-font-lang-notref.html
== text-measure.html text-measure-ref.html
== strokeText-path.html strokeText-path-ref.html
# gradient off-by-one, fails on windows and linux

View File

@ -0,0 +1,15 @@
<html>
<script>
function load() {
var ctx = document.getElementById("canvas").getContext("2d");
ctx.font = "bold 12px sans-serif";
ctx.scale(4, 4);
var str = "HeHeHeHe";
ctx.fillText(str, 0, 15);
}
</script>
<body onload="load();">
<canvas id="canvas" width="400" height="200"></canvas>
</body>
</html>

View File

@ -0,0 +1,19 @@
<html>
<script>
function load() {
var ctx = document.getElementById("canvas").getContext("2d");
ctx.font = "bold 12px sans-serif";
ctx.scale(4, 4);
var str = "HeHeHeHe";
var x = 0;
for (var i = 0; i < str.length; ++i) {
ctx.fillText(str[i], x, 15);
x += ctx.measureText(str[i]).width;
}
}
</script>
<body onload="load();">
<canvas id="canvas" width="400" height="200"></canvas>
</body>
</html>