| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 |
| 5 <div id="main" role="main"> |
| 6 |
| 7 <p id="para">This<br> is a<a href="#g">test</a>of selection</p> |
| 8 |
| 9 </div> |
| 10 |
| 11 <script> |
| 12 test(function() |
| 13 { |
| 14 assert_not_equals(window.accessibilityController, undefined, 'This test
requires accessibilityController'); |
| 15 |
| 16 var axPara = accessibilityController.accessibleElementById("para"); |
| 17 var axLastText = axPara.childAtIndex(4); |
| 18 assert_equals(axLastText.role, "AXRole: AXStaticText"); |
| 19 assert_equals(axLastText.name, "of selection"); |
| 20 |
| 21 axLastText.setSelectedTextRange(0, 2); |
| 22 |
| 23 var selection = window.getSelection(); |
| 24 var range = selection.getRangeAt(0); |
| 25 |
| 26 assert_equals(range.toString(), "of"); |
| 27 }, "Select text after a link."); |
| 28 </script> |
| OLD | NEW |