Index: LayoutTests/accessibility/textbox-role-reports-selection.html |
diff --git a/LayoutTests/accessibility/textbox-role-reports-selection.html b/LayoutTests/accessibility/textbox-role-reports-selection.html |
deleted file mode 100644 |
index c6ab2ccd56c3d7568e61a1e7e8102d5ec8577a97..0000000000000000000000000000000000000000 |
--- a/LayoutTests/accessibility/textbox-role-reports-selection.html |
+++ /dev/null |
@@ -1,54 +0,0 @@ |
-<!DOCTYPE HTML PUBLIC> |
-<html> |
-<head> |
-<script src="../resources/js-test.js"></script> |
-</head> |
-<body> |
-This tests that the AXSelection property is correctly reported for non-native text boxes.<br> |
-<div role="textbox" id="ariaTextBox" aria-multiline="false" tabindex="0">Some text in a textbox (34 chars).</div> |
-<div id="console"></div> |
-<script> |
- function assertEvaluatesTo(actual, expected, message) { |
- var actualValue = 0; |
- try { |
- actualValue = eval(actual); |
- } catch (e) { |
- debug("Evaluating " + actual + ": Threw exception " + e); |
- return; |
- } |
- if (actualValue === expected) |
- debug("PASS: " + actual + " is " + expected + (message ? " (" + message + ")" : "")); |
- else |
- debug("FAIL: " + actual + " should be " + expected + ", got " + actualValue + (message ? " (" + message + ")" : "")); |
- } |
- |
- function assertCorrectAXSelection(element, selection, message) { |
- element.focus(); |
- var selectionValues = /\{(\d+), (\d+)\}/.exec(selection); |
- var selectionStart = eval(selectionValues[1]); |
- var selectionLength = eval(selectionValues[2]); |
- var selectionEnd = selectionStart + selectionLength; |
- |
- window.getSelection().setBaseAndExtent(element.firstChild, selectionStart, element.firstChild, selectionEnd); |
- var axElement = accessibilityController.focusedElement; |
- axSelection = axElement.selectedTextRange; |
- assertEvaluatesTo("axSelection", selection, message); |
- } |
- |
- if (window.testRunner && window.accessibilityController) { |
- window.testRunner.dumpAsText(); |
- var ariaTextBox = document.getElementById("ariaTextBox"); |
- var textLength = ariaTextBox.textContent.length; |
- |
- assertCorrectAXSelection(ariaTextBox, "{0, 0}", "Collapsed selection at start"); |
- assertCorrectAXSelection(ariaTextBox, "{" + textLength + ", 0}", "Collapsed selection at end"); |
- assertCorrectAXSelection(ariaTextBox, "{15, 0}", "Collapsed selection in the middle"); |
- assertCorrectAXSelection(ariaTextBox, "{15, 2}", "Non-collapsed selection in the middle"); |
- assertCorrectAXSelection(ariaTextBox, "{0, 15}", "Non-collapsed selection at the start"); |
- assertCorrectAXSelection(ariaTextBox, "{15, "+ (textLength - 15) + "}", "Non-collapsed selection at the end"); |
- } |
- |
-</script> |
- |
-</body> |
-</html> |