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

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: Return null VisiblePosition Created 4 years, 5 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 var axPara = accessibilityController.accessibleElementById("para");
yosin_UTC9 2016/07/27 01:31:14 It is better to have assert_not_equals(window.acc
dmazzoni 2016/07/27 06:45:17 Done
15 var axLastText = axPara.childAtIndex(4);
16 assert_equals(axLastText.role, "AXRole: AXStaticText");
17 assert_equals(axLastText.name, "of selection");
18
19 axLastText.setSelectedTextRange(0, 2);
20
21 var selection = window.getSelection();
22 var range = selection.getRangeAt(0);
23
24 assert_equals(range.toString(), "of");
25 }, "Select text after a link.");
26 </script>
27
28 <script>
yosin_UTC9 2016/07/27 01:31:14 You don't need to have hide test sample. Or put |
dmazzoni 2016/07/27 06:45:17 Removed. Is there a way to have multiple ignored
29 if (window.testRunner)
30 document.getElementById("main").style.display = "none";;
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698