| Index: LayoutTests/accessibility/inline-text-textarea.html
|
| diff --git a/LayoutTests/accessibility/inline-text-textarea.html b/LayoutTests/accessibility/inline-text-textarea.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..450feeeedc6b9440c58a43b9a02f0533761f0a68
|
| --- /dev/null
|
| +++ b/LayoutTests/accessibility/inline-text-textarea.html
|
| @@ -0,0 +1,46 @@
|
| +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
| +<html>
|
| +<head>
|
| +<script src="../fast/js/resources/js-test-pre.js"></script>
|
| +</head>
|
| +<body>
|
| +
|
| +<textarea id="textarea" cols=30 rows=20>This textarea contains several lines of text. It demonstrates
|
| +how updating a single InlineTextBox is a lot more efficient than updating the whole TextArea.</textarea>
|
| +
|
| +<p id="description"></p>
|
| +
|
| +<div id="console"></div>
|
| +
|
| +<script>
|
| +
|
| + description("Demonstrates that when typing in a textarea, not all of the InlineTextBoxes need to be updated for every character pressed.");
|
| +
|
| + if (window.accessibilityController) {
|
| + window.axTextarea = accessibilityController.accessibleElementById('textarea');
|
| + window.axDiv = axTextarea.childAtIndex(0);
|
| + window.axStaticText = axDiv.childAtIndex(0);
|
| + shouldBe("axStaticText.childrenCount", "9");
|
| +
|
| + window.axInlineBefore0 = axStaticText.childAtIndex(0);
|
| + window.axInlineBefore8 = axStaticText.childAtIndex(8);
|
| +
|
| + document.getElementById("textarea").focus();
|
| + document.getElementById("textarea").setSelectionRange(45, 45);
|
| +
|
| + // Insert a character in the first paragraph.
|
| + document.execCommand("InsertText", false, 'x');
|
| +
|
| + // The inline text boxes in the first paragraph change, but the
|
| + // inline text boxes in the last paragraph are reused.
|
| + window.axInlineAfter0 = axStaticText.childAtIndex(0);
|
| + window.axInlineAfter8 = axStaticText.childAtIndex(8);
|
| + shouldBe("axStaticText.childrenCount", "9");
|
| + shouldBe("axInlineBefore0.isEqual(axInlineAfter0)", "false");
|
| + shouldBe("axInlineBefore8.isEqual(axInlineAfter8)", "true");
|
| + }
|
| +</script>
|
| +
|
| +<script src="../fast/js/resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
|
|