| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../fast/js/resources/js-test-pre.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 |
| 8 <textarea id="textarea" cols=30 rows=20>This textarea contains several lines of
text. It demonstrates |
| 9 how updating a single InlineTextBox is a lot more efficient than updating the wh
ole TextArea.</textarea> |
| 10 |
| 11 <p id="description"></p> |
| 12 |
| 13 <div id="console"></div> |
| 14 |
| 15 <script> |
| 16 |
| 17 description("Demonstrates that when typing in a textarea, not all of the Inl
ineTextBoxes need to be updated for every character pressed."); |
| 18 |
| 19 if (window.accessibilityController) { |
| 20 window.axTextarea = accessibilityController.accessibleElementById('texta
rea'); |
| 21 window.axDiv = axTextarea.childAtIndex(0); |
| 22 window.axStaticText = axDiv.childAtIndex(0); |
| 23 shouldBe("axStaticText.childrenCount", "9"); |
| 24 |
| 25 window.axInlineBefore0 = axStaticText.childAtIndex(0); |
| 26 window.axInlineBefore8 = axStaticText.childAtIndex(8); |
| 27 |
| 28 document.getElementById("textarea").focus(); |
| 29 document.getElementById("textarea").setSelectionRange(45, 45); |
| 30 |
| 31 // Insert a character in the first paragraph. |
| 32 document.execCommand("InsertText", false, 'x'); |
| 33 |
| 34 // The inline text boxes in the first paragraph change, but the |
| 35 // inline text boxes in the last paragraph are reused. |
| 36 window.axInlineAfter0 = axStaticText.childAtIndex(0); |
| 37 window.axInlineAfter8 = axStaticText.childAtIndex(8); |
| 38 shouldBe("axStaticText.childrenCount", "9"); |
| 39 shouldBe("axInlineBefore0.isEqual(axInlineAfter0)", "false"); |
| 40 shouldBe("axInlineBefore8.isEqual(axInlineAfter8)", "true"); |
| 41 } |
| 42 </script> |
| 43 |
| 44 <script src="../fast/js/resources/js-test-post.js"></script> |
| 45 </body> |
| 46 </html> |
| OLD | NEW |