| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 | 4 |
| 5 <div id="main" role="main"> | 5 <div id="main" role="main"> |
| 6 | 6 |
| 7 <div id="contenteditable-textbox" role="textbox" contenteditable="true"> | 7 <div id="contenteditable-textbox" role="textbox" contenteditable="true"> |
| 8 <div id="contenteditable-line1">Line 1</div> | 8 <div id="contenteditable-line1">Line 1</div> |
| 9 <textarea id="contenteditable-line2" rows="1" cols="40">Line 2</textarea
> | 9 <textarea id="contenteditable-line2" rows="1" cols="40">Line 2</textarea
> |
| 10 </div> | 10 </div> |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 selection.addRange(selectionRange); | 255 selection.addRange(selectionRange); |
| 256 | 256 |
| 257 assert_equals(contenteditableAccessible.selectionStart, caretPos
ition); | 257 assert_equals(contenteditableAccessible.selectionStart, caretPos
ition); |
| 258 assert_equals(contenteditableAccessible.selectionEnd, caretPosit
ion); | 258 assert_equals(contenteditableAccessible.selectionEnd, caretPosit
ion); |
| 259 | 259 |
| 260 assert_equals(mainAccessible.selectionStart, | 260 assert_equals(mainAccessible.selectionStart, |
| 261 mainOffset + caretPosition); | 261 mainOffset + caretPosition); |
| 262 assert_equals(mainAccessible.selectionEnd, | 262 assert_equals(mainAccessible.selectionEnd, |
| 263 mainOffset + caretPosition); | 263 mainOffset + caretPosition); |
| 264 | 264 |
| 265 assert_equals(rootAccessible.selectionAnchorObject.stringValue, | 265 assert_equals(rootAccessible.selectionAnchorObject.name, |
| 266 "AXValue: " + contenteditableLines[lineNumber].textContent.t
rim()); | 266 contenteditableLines[lineNumber].textContent.trim()); |
| 267 assert_equals(rootAccessible.selectionAnchorOffset, | 267 assert_equals(rootAccessible.selectionAnchorOffset, |
| 268 characterOffset); | 268 characterOffset); |
| 269 assert_equals(rootAccessible.selectionFocusObject.stringValue, | 269 assert_equals(rootAccessible.selectionFocusObject.name, |
| 270 "AXValue: " + contenteditableLines[lineNumber].textContent.t
rim()); | 270 contenteditableLines[lineNumber].textContent.trim()); |
| 271 assert_equals(rootAccessible.selectionFocusOffset, | 271 assert_equals(rootAccessible.selectionFocusOffset, |
| 272 characterOffset); | 272 characterOffset); |
| 273 } | 273 } |
| 274 } | 274 } |
| 275 | 275 |
| 276 }, "Test moving the caret across two paragraphs."); | 276 }, "Test moving the caret across two paragraphs."); |
| 277 </script> | 277 </script> |
| 278 | 278 |
| 279 <script> | 279 <script> |
| 280 if (window.testRunner) | 280 if (window.testRunner) |
| 281 document.getElementById("main").style.display = "none";; | 281 document.getElementById("main").style.display = "none";; |
| 282 </script> | 282 </script> |
| OLD | NEW |