Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / contenteditable-line-for-index.html
blobfe61c29492a7213264b9294c9e0061c3ed43aee8
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body>
8 <div id="editable-div" contenteditable>
9 <div>line 1</div>
10 <p>line 2<br>line 3</p>
11 </div>
13 <script>
14 description("This tests that the line number of a character offset is computed correctly for content editable elements.");
16 if (window.accessibilityController) {
18 var div = document.getElementById("editable-div");
19 div.focus();
20 var axEditable = accessibilityController.focusedElement;
22 for (var line = 0; line < 3; ++line) {
23 for (var character = 0; character < 7; ++character) {
24 var index = line * 7 + character;
25 shouldBeEqualToNumber("axEditable.lineForIndex(index)", line);
29 // Placing the caret after the last character should not change the line.
30 var textLength = div.innerText.length;
31 shouldBeEqualToNumber("textLength", 20);
32 shouldBeEqualToNumber("axEditable.lineForIndex(textLength)", 2);
35 </script>
36 </body>
37 </html>