Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / pre-wrap-trailing-tab.html
blob5f5e1a75e873977393c1bfe41f49f244cb26008f
1 <!DOCTYPE html>
2 <html>
3 <body><div id="tests"><div style="width: 1ex; font-size: 1em; white-space: pre-wrap;"
4 ></div><div style="width: 1ex; font-size: 1em; white-space: pre-wrap; word-wrap: break-word;"
5 ></div><textarea style="width: 1ex; font-size: 1em;"
6 ></textarea></div><pre id="log"></pre><script>
8 function assertEqual(name, length, endOffset)
10 log.textContent += '\n' + name + ': ';
11 if (length != endOffset)
12 log.textContent += 'FAIL - length was ' + length + ' but selection end was ' + endOffset + ' after selecting all text';
13 else
14 log.textContent += 'PASS';
17 var tests = document.getElementById('tests').childNodes;
18 var log = document.getElementById('log');
19 log.textContent = 'This test ensures WebKit renders the trailing whitespace properly. You should see PASS thrice below.\n';
21 var letter = 'a';
22 for (var i = 0; i < tests.length; i++, letter = String.fromCharCode(letter.charCodeAt(0) + 1)) {
23 if (tests[i].select) {
24 tests[i].value = letter + '\t';
25 tests[i].focus();
26 tests[i].select();
27 var endOffset = tests[i].selectionEnd;
28 } else {
29 tests[i].textContent = letter + '\t';
30 window.getSelection().selectAllChildren(tests[i]);
31 var endOffset = window.getSelection().getRangeAt(0).endOffset;
33 assertEqual('test ' + i, 2, endOffset);
36 if (window.testRunner) {
37 testRunner.dumpAsText();
38 document.getElementById('tests').style.display = 'none';
41 </script></pre></body>
42 </html>