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

Unified Diff: content/test/data/accessibility/aria/aria-searchbox-with-selection.html

Issue 1315703004: Added browser tests for caret position and selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android tests. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/test/data/accessibility/aria/aria-searchbox-with-selection.html
diff --git a/content/test/data/accessibility/aria/aria-searchbox-with-selection.html b/content/test/data/accessibility/aria/aria-searchbox-with-selection.html
new file mode 100644
index 0000000000000000000000000000000000000000..7fde0f5cb18088cc0ab6b01e28e4436e32cf123a
--- /dev/null
+++ b/content/test/data/accessibility/aria/aria-searchbox-with-selection.html
@@ -0,0 +1,24 @@
+<!--
+@MAC-ALLOW:AXRole*
+@MAC-ALLOW:AXSubrole*
+@WIN-ALLOW:xml-roles*
+@WIN-ALLOW:caret_offset*
+@WIN-ALLOW:n_selections*
+@WIN-ALLOW:selection_start*
+@WIN-ALLOW:selection_end*
+-->
+<!DOCTYPE html>
+<html>
+<body>
+ <div id="searchbox" role="searchbox" tabindex="0">ARIA role searchbox.</div>
+ <script>
+ var selection = window.getSelection();
+ var selectionRange = document.createRange();
+ var searchbox = document.getElementById('searchbox');
+ searchbox.focus();
+ selectionRange.selectNodeContents(searchbox);
+ selection.removeAllRanges();
+ selection.addRange(selectionRange);
+ </script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698