Index: LayoutTests/accessibility/editable-selected-range.html |
diff --git a/LayoutTests/accessibility/editable-selected-range.html b/LayoutTests/accessibility/editable-selected-range.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9fe7fe465381bd2651c9c9980ad076b57c264325 |
--- /dev/null |
+++ b/LayoutTests/accessibility/editable-selected-range.html |
@@ -0,0 +1,37 @@ |
+<html> |
+<script> |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+</script> |
+<body> |
+ |
+ <div id="result"></div> |
+ |
+ <textarea name="area1" id="area1" rows="5" cols="40"> |
+line 1 |
+line 2 |
+line 3 |
+ </textarea> |
+ |
+ <script> |
+ if (window.accessibilityController) { |
+ var result = document.getElementById("result"); |
+ |
+ var area1 = document.getElementById("area1"); |
+ area1.focus(); |
+ |
+ var textArea = accessibilityController.focusedElement; |
+ |
+ textArea.setSelectedTextRange(4,0); |
+ result.innerText += "(4,0) = " + textArea.selectedTextRange + "\n\n"; |
+ |
+ textArea.setSelectedTextRange(8,2); |
+ result.innerText += "(8,2) = " + textArea.selectedTextRange + "\n\n"; |
+ |
+ textArea.setSelectedTextRange(100,0); |
+ result.innerText += "(100,0) = " + textArea.selectedTextRange + "\n\n"; |
+ |
+ } |
+ </script> |
+</body> |
+</html> |