| Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-text-baseline-tiny-fonts.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-text-baseline-tiny-fonts.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-text-baseline-tiny-fonts.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3e7761c86963ffc3bbc8cda6240699bdba17917d
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-text-baseline-tiny-fonts.html
|
| @@ -0,0 +1,36 @@
|
| +<!DOCTYPE html>
|
| +<canvas id="canvas1" width=200 height=200></canvas>
|
| +<canvas id="canvas2" width=200 height=200></canvas>
|
| +<canvas id="canvas3" width=200 height=200></canvas>
|
| +<canvas id="canvas4" width=200 height=200></canvas>
|
| +
|
| +<script>
|
| +if (window.testRunner)
|
| + window.testRunner.dumpAsTextWithPixelResults();
|
| +
|
| +function draw() {
|
| + for(i = 1; i <= 4; i++) {
|
| + var ctx = document.getElementById("canvas" + i).getContext("2d");
|
| + ctx.scale(10, 10);
|
| + ctx.lineWidth = 0.1;
|
| +
|
| + ctx.beginPath();
|
| + ctx.moveTo(0, 10);
|
| + ctx.lineTo(20, 10);
|
| + ctx.stroke();
|
| +
|
| + ctx.font = i + "px sans-serif"
|
| + ctx.textBaseline = "top"
|
| + ctx.strokeText("A", 1, 10);
|
| + ctx.textBaseline = "middle"
|
| + ctx.strokeText("B", 5, 10);
|
| + ctx.textBaseline = "alphabetic"
|
| + ctx.strokeText("C", 10, 10);
|
| + ctx.textBaseline = "bottom"
|
| + ctx.strokeText("D", 15, 10);
|
| + }
|
| +}
|
| +
|
| +window.onload = draw;
|
| +</script>
|
| +
|
|
|