OLD | NEW |
1 <html> | 1 <html> |
2 <script src="../resources/js-test.js"></script> | 2 <script src="../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 </script> | 6 </script> |
7 <body> | 7 <body> |
8 <div id="console"></div> | 8 <div id="console"></div> |
9 <textarea name="area1" id="area1" rows="5" cols="40"> | 9 <textarea name="area1" id="area1" rows="5" cols="40"> |
10 line 1 | 10 line 1 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 var contenteditableDiv = document.getElementById("contenteditable-di
v"); | 43 var contenteditableDiv = document.getElementById("contenteditable-di
v"); |
44 contenteditableDiv.focus(); | 44 contenteditableDiv.focus(); |
45 var contenteditableAXUIElement = accessibilityController.focusedElem
ent; | 45 var contenteditableAXUIElement = accessibilityController.focusedElem
ent; |
46 | 46 |
47 var contenteditableLine1 = document.getElementById("contenteditable-
line1"); | 47 var contenteditableLine1 = document.getElementById("contenteditable-
line1"); |
48 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine
1, 1, contenteditableLine1, 1); " + | 48 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine
1, 1, contenteditableLine1, 1); " + |
49 "contenteditableAXUIElement.insertionPointLineNumber;", "0"
); | 49 "contenteditableAXUIElement.insertionPointLineNumber;", "0"
); |
50 | 50 |
51 var contenteditableLine2 = document.getElementById("contenteditable-
line2"); | 51 var contenteditableLine2 = document.getElementById("contenteditable-
line2"); |
52 shouldBe("contenteditableLine2.selectionStart = 1; contenteditableLi
ne2.selectionEnd = 1;" + | 52 shouldBe("contenteditableLine2.selectionStart = 1; contenteditableLi
ne2.selectionEnd = 1;" + |
53 "contenteditableAXUIElement.insertionPointLineNumber;", "-1
"); | 53 "contenteditableAXUIElement.insertionPointLineNumber;", "0"
); |
54 | 54 |
55 var contenteditableLine3 = document.getElementById("contenteditable-
line3"); | 55 var contenteditableLine3 = document.getElementById("contenteditable-
line3"); |
56 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine
3, 1, contenteditableLine3, 1); " + | 56 shouldBe("window.getSelection().setBaseAndExtent(contenteditableLine
3, 1, contenteditableLine3, 1); " + |
57 "contenteditableAXUIElement.insertionPointLineNumber;", "2"
); | 57 "contenteditableAXUIElement.insertionPointLineNumber;", "2"
); |
58 | 58 |
59 contenteditableLine2.focus(); | 59 contenteditableLine2.focus(); |
60 var textareaAXUIElement = accessibilityController.focusedElement; | 60 var textareaAXUIElement = accessibilityController.focusedElement; |
61 shouldBe("textareaAXUIElement.insertionPointLineNumber", "0"); | 61 shouldBe("textareaAXUIElement.insertionPointLineNumber", "0"); |
62 } | 62 } |
63 </script> | 63 </script> |
64 </body> | 64 </body> |
65 </html> | 65 </html> |
OLD | NEW |