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

Side by Side Diff: content/test/data/accessibility/aria/aria-textbox-with-selection.html

Issue 2931893002: More precise use of multiline state (Closed)
Patch Set: Remove unnecessary changes Created 3 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
1 <!-- 1 <!--
2 @MAC-ALLOW:AXRole* 2 @MAC-ALLOW:AXRole*
3 @WIN-ALLOW:caret_offset* 3 @WIN-ALLOW:caret_offset*
4 @WIN-ALLOW:ia2_hypertext=* 4 @WIN-ALLOW:ia2_hypertext=*
5 @WIN-ALLOW:IA2_STATE_MULTI_LINE 5 @WIN-ALLOW:IA2_STATE_MULTI_LINE
6 @WIN-ALLOW:IA2_STATE_SINGLE_LINE 6 @WIN-ALLOW:IA2_STATE_SINGLE_LINE
7 @WIN-ALLOW:n_selections* 7 @WIN-ALLOW:n_selections*
8 @WIN-ALLOW:selection_start* 8 @WIN-ALLOW:selection_start*
9 @WIN-ALLOW:selection_end* 9 @WIN-ALLOW:selection_end*
10 @WIN-ALLOW:xml-roles* 10 @WIN-ALLOW:xml-roles*
11 --> 11 -->
12 <!DOCTYPE html> 12 <!DOCTYPE html>
13 <html> 13 <html>
14 <body> 14 <body>
15 <div id="text1" role="textbox">Single line.</div> 15 <div id="text1" role="textbox">Single line.</div>
16 <!-- Will not expose multiline state because it's not actually editable. -->
16 <div id="text2" role="textbox" aria-multiline="true">Multiple<br>lines.</div> 17 <div id="text2" role="textbox" aria-multiline="true">Multiple<br>lines.</div>
17 18
18 <script> 19 <script>
19 var selection = window.getSelection(); 20 var selection = window.getSelection();
20 var selectionRange = document.createRange(); 21 var selectionRange = document.createRange();
21 var text1 = document.getElementById("text1"); 22 var text1 = document.getElementById("text1");
22 var text2 = document.getElementById("text2"); 23 var text2 = document.getElementById("text2");
23 // Selection should only affect the text boxes as a whole. No caret should 24 // Selection should only affect the text boxes as a whole. No caret should
24 // appear within the text boxes. 25 // appear within the text boxes.
25 selectionRange.setStart(text1, 0); 26 selectionRange.setStart(text1, 0);
26 selectionRange.setEnd(text2, 1); 27 selectionRange.setEnd(text2, 1);
27 selection.removeAllRanges(); 28 selection.removeAllRanges();
28 selection.addRange(selectionRange); 29 selection.addRange(selectionRange);
29 </script> 30 </script>
30 </body> 31 </body>
31 </html> 32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698