Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/set-selection-link.html

Issue 2164813003: Fix visible position calculation in accessible setSelection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ChromeVox workaround and update test Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698