Index: LayoutTests/fast/canvas/canvas-text-ideographic-space.html |
diff --git a/LayoutTests/fast/canvas/canvas-text-ideographic-space.html b/LayoutTests/fast/canvas/canvas-text-ideographic-space.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5982e026674f8fd20a8b02f81502156ab1a66992 |
--- /dev/null |
+++ b/LayoutTests/fast/canvas/canvas-text-ideographic-space.html |
@@ -0,0 +1,36 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <meta charcode="utf-16"> |
+ <script src="../../resources/js-test.js"></script> |
+ <style> |
+ |
+ span { |
+ padding : 0px; |
+ font-size : 12px; |
+ font-family : Arial; |
+ display : inline; |
+ } |
+ |
+ </style> |
+</head> |
+<body> |
+ <div><span>a b c</span></div> |
+ <div><canvas></canvas></div> |
+ <script> |
+ |
+ var canvas = document.querySelector("canvas"); |
+ var context = canvas.getContext("2d"); |
+ var span = document.querySelector("span"); |
+ |
+ var abc = 'a' + '\u3000' + 'b' + '\u3000' + 'c'; |
+ context.font = "12px Arial"; |
+ context.fillText(abc, 0, 20); |
+ |
+ spanWidth = span.offsetWidth; |
+ canvasWidth = context.measureText(abc).width; |
+ shouldBeTrue("spanWidth == canvasWidth"); |
+ |
+ </script> |
+</body> |
+</html> |