Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / zero-width-characters.html
blobb6be14ce25db65ed96dc1da3f1e58f7aa662e80a
1 <head>
2 <script>
3 function test()
5 if (window.testRunner)
6 testRunner.dumpAsText();
7 var testString = "";
8 for (var i = 0; i < 32; ++i) // >
9 if (i != 9 && i != 10 && i != 13) // ;
10 testString += String.fromCharCode(i);
11 testString += String.fromCharCode(0x200B);
12 testString += String.fromCharCode(0x200C);
13 testString += String.fromCharCode(0x200D);
14 testString += String.fromCharCode(0x200E);
15 testString += String.fromCharCode(0x200F);
16 testString += String.fromCharCode(0xFEFF);
17 testString += String.fromCharCode(0xFFFC);
18 var span = document.getElementById("characters");
19 var abWidth = span.offsetWidth;
20 span.firstChild.data = "a";
21 var aWidth = span.offsetWidth;
22 span.firstChild.data = "a" + testString + "b";
23 var abWithCharactersWidth = span.offsetWidth;
25 var testArea = document.getElementById("testArea");
26 testArea.parentNode.removeChild(testArea);
28 if (abWithCharactersWidth > abWidth)
29 result = "FAIL: One or more of the characters had a non-zero width.";
30 else if (abWidth > aWidth)
31 result = "PASS: All the characters had zero width.";
32 else
33 result = "FAIL: Width measurement seems to have failed.";
35 document.getElementById("result").firstChild.data = result;
37 </script>
38 </head>
39 <body onload="test()">
40 <p>This test checks various characters that should always be zero width to ensure that they are.
41 The WebKit text system ensures this in a way that's independent of the fonts installed on the system.</p>
42 <p id="result">FAIL: Script did not run to completion.</p>
43 <p id="testArea"><span id="characters">ab</span></p>
44 </body>