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 <p id="p" style="width: 10em;"> |
| 9 This paragraph contains two lines of text. |
| 10 </p> |
| 11 |
| 12 <p id="description"></p> |
| 13 <pre id="tree"></pre> |
| 14 <div id="console"></div> |
| 15 |
| 16 <script> |
| 17 |
| 18 description("Tests that accessible inline text boxes update immediately when
a static text element changes."); |
| 19 |
| 20 if (window.accessibilityController) { |
| 21 window.axParagraph = accessibilityController.accessibleElementById('p'); |
| 22 window.axStaticText = axParagraph.childAtIndex(0); |
| 23 shouldBe("axStaticText.childrenCount", "2"); |
| 24 |
| 25 window.axInlineBefore0 = axStaticText.childAtIndex(0); |
| 26 shouldBe("axInlineBefore0.stringValue", "'AXValue: This paragraph conta
ins '"); |
| 27 window.axInlineBefore1 = axStaticText.childAtIndex(1); |
| 28 shouldBe("axInlineBefore1.stringValue", "'AXValue: two lines of text.'")
; |
| 29 |
| 30 // Modify the text. |
| 31 document.getElementById("p").innerText += ' One more sentence.'; |
| 32 |
| 33 // Make sure the inline text boxes changed. |
| 34 shouldBe("axStaticText.childrenCount", "3"); |
| 35 window.axInlineAfter0 = axStaticText.childAtIndex(0); |
| 36 shouldBe("axInlineAfter0.stringValue", "'AXValue: This paragraph contai
ns '"); |
| 37 window.axInlineAfter1 = axStaticText.childAtIndex(1); |
| 38 shouldBe("axInlineAfter1.stringValue", "'AXValue: two lines of text. One
'"); |
| 39 window.axInlineAfter2 = axStaticText.childAtIndex(2); |
| 40 shouldBe("axInlineAfter2.stringValue", "'AXValue: more sentence.'"); |
| 41 |
| 42 // Make sure the old object pointing to the second text box is no longer
valid. |
| 43 shouldBe("axInlineBefore1.stringValue", "'AXValue: '"); |
| 44 } |
| 45 </script> |
| 46 |
| 47 <script src="../fast/js/resources/js-test-post.js"></script> |
| 48 </body> |
| 49 </html> |
OLD | NEW |