2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
6 The
<b id=
"quick">quick
</b> brown fox
8 jumps over the lazy
<b id=
"dog">dog
</b>.
14 var axObj
= accessibilityController
.accessibleElementById("p");
15 while (axObj
.childrenCount
> 0)
16 axObj
= axObj
.childAtIndex(0);
17 assert_equals(axObj
.role
, "AXRole: AXInlineTextBox");
21 while (axObj
&& axObj
.isValid
) {
22 assert_equals(axObj
.role
, "AXRole: AXInlineTextBox");
23 line
.push(axObj
.stringValue
.replace("AXValue: ", ""));
25 axObj
= axObj
.nextOnLine();
28 assert_equals(JSON
.stringify(line
), JSON
.stringify(["The ","quick"," brown fox ","\n"]));
30 // Now walk backwards.
33 while (axObj
&& axObj
.isValid
) {
34 assert_equals(axObj
.role
, "AXRole: AXInlineTextBox");
35 line2
.unshift(axObj
.stringValue
.replace("AXValue: ", ""));
36 axObj
= axObj
.previousOnLine();
39 assert_equals(JSON
.stringify(line2
), JSON
.stringify(["The ","quick"," brown fox ","\n"]));
40 }, "Walk the inline text boxes on a line of text.");
42 if (window
.testRunner
)
43 document
.getElementById('p').style
.display
= 'none';