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

Side by Side Diff: LayoutTests/accessibility/editable-selected-range.html

Issue 1056763002: Reland: Made content editables report the caret and text selection by treating them as text controls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merged with master. Created 5 years, 8 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 <html>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5 </script>
6 <body>
7
8 <div id="result"></div>
9
10 <textarea name="area1" id="area1" rows="5" cols="40">
11 line 1
12 line 2
13 line 3
14 </textarea>
15
16 <script>
17 if (window.accessibilityController) {
18 var result = document.getElementById("result");
19
20 var area1 = document.getElementById("area1");
21 area1.focus();
22
23 var textArea = accessibilityController.focusedElement;
24
25 textArea.setSelectedTextRange(4,0);
26 result.innerText += "(4,0) = " + textArea.selectedTextRange + "\n\n" ;
27
28 textArea.setSelectedTextRange(8,2);
29 result.innerText += "(8,2) = " + textArea.selectedTextRange + "\n\n" ;
30
31 textArea.setSelectedTextRange(100,0);
32 result.innerText += "(100,0) = " + textArea.selectedTextRange + "\n\ n";
33
34 }
35 </script>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698