| Index: third_party/WebKit/LayoutTests/accessibility/set-selection-link.html
|
| diff --git a/third_party/WebKit/LayoutTests/accessibility/set-selection-link.html b/third_party/WebKit/LayoutTests/accessibility/set-selection-link.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..911346432b771e872e7df054bf7c8b6d9e0ab397
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/accessibility/set-selection-link.html
|
| @@ -0,0 +1,28 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +
|
| +<div id="main" role="main">
|
| +
|
| + <p id="para">This<br> is a<a href="#g">test</a>of selection</p>
|
| +
|
| +</div>
|
| +
|
| +<script>
|
| + test(function()
|
| + {
|
| + assert_not_equals(window.accessibilityController, undefined, 'This test requires accessibilityController');
|
| +
|
| + var axPara = accessibilityController.accessibleElementById("para");
|
| + var axLastText = axPara.childAtIndex(4);
|
| + assert_equals(axLastText.role, "AXRole: AXStaticText");
|
| + assert_equals(axLastText.name, "of selection");
|
| +
|
| + axLastText.setSelectedTextRange(0, 2);
|
| +
|
| + var selection = window.getSelection();
|
| + var range = selection.getRangeAt(0);
|
| +
|
| + assert_equals(range.toString(), "of");
|
| + }, "Select text after a link.");
|
| +</script>
|
|
|