3 <script src="../fast/js/resources/js-test-pre.js"></script>
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.waitUntilDone();
13 function indent(count)
16 return spaces.substr(0, count);
19 function dumpObject(axObject)
21 debug(indent(indentLevel) + "description: " + axObject.description);
22 debug(indent(indentLevel) + "role: " + axObject.role);
26 function dumpChildren(axObject)
28 var count = axObject.childrenCount
33 for (var ndx = 0; ndx < count; ndx++) {
34 var childAXObject = axObject.childAtIndex(ndx);
35 dumpObject(childAXObject);
36 if (childAXObject.childrenCount) {
37 // don't bother dumping static text children
38 if ( childAXObject.role != "AXRole: AXStaticText")
39 dumpChildren(childAXObject);
45 function dumpVideoAX()
47 debug("<br>+++++++++++++++++++++++++++++++++++<br>");
48 debug("State at '" + event.type + "' event:<br>");
50 if (!window.accessibilityController)
53 var body = document.getElementsByTagName("body")[0];
56 var vidAXObject = accessibilityController.focusedElement.childAtIndex(0);
58 dumpChildren(vidAXObject);
60 if (window.testRunner && event.type == 'canplaythrough')
61 testRunner.notifyDone();
68 <video id=vid src="../media/content/test.mp4" controls oncanplaythrough="dumpVideoAX()">
71 <div>Dump <video> element controller accessibility object tree at 'canplaythrough' event.</div>
73 <div id=console></div>