Index: LayoutTests/fast/canvas/canvas-text-space-characters.html |
diff --git a/LayoutTests/fast/canvas/canvas-text-space-characters.html b/LayoutTests/fast/canvas/canvas-text-space-characters.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b42f32855a513fbc311f6ea363e8962382f255c6 |
--- /dev/null |
+++ b/LayoutTests/fast/canvas/canvas-text-space-characters.html |
@@ -0,0 +1,31 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+ <meta charcode="utf-16"> |
+ <script src="../../resources/js-test.js"></script> |
+</head> |
+<body> |
+ <canvas></canvas> |
+ <script> |
+ |
+ if (window.testRunner) |
+ testRunner.dumpAsTextWithPixelResults(); |
+ |
+ var canvas = document.querySelector("canvas"); |
+ var context = canvas.getContext("2d"); |
+ |
+ var testStr1 = 'a' + '\u0009' + 'b' + '\u000A' + 'c' + '\u000C' + 'd' + '\u000D' + 'e'; |
+ var testStr2 = 'a' + '\u0020' + 'b' + '\u0020' + 'c' + '\u0020' + 'd' + '\u0020' + 'e'; |
+ |
+ context.font = "12px Arial"; |
+ context.fillText(testStr1, 0, 10); |
+ context.fillText(testStr2, 0, 30); |
+ |
+ testStr1Width = context.measureText(testStr1).width; |
+ testStr2Width = context.measureText(testStr2).width; |
+ |
+ shouldBeTrue("testStr1Width == testStr2Width"); |
+ |
+ </script> |
+</body> |
+</html> |