3 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
8 InspectorTest
.sendCommand("DOM.getDocument", {}, onGotDocument
);
10 function onGotDocument(msg
)
13 InspectorTest
.log(msg
.error
.message
);
14 InspectorTest
.completeTest();
17 var rootNode
= msg
.result
.root
;
18 InspectorTest
.sendCommand("DOM.querySelector", { "nodeId": rootNode
.nodeId
, "selector": "input" }, onQuerySelector
);
21 function onQuerySelector(msg
)
24 InspectorTest
.log(msg
.error
.message
);
25 InspectorTest
.completeTest();
28 var node
= msg
.result
;
29 InspectorTest
.sendCommand("Accessibility.getAXNode", { "nodeId": node
.nodeId
}, onGotAccessibilityNode
.bind(null, node
));
32 function onGotAccessibilityNode(domNode
, msg
)
35 InspectorTest
.log(msg
.error
.message
);
36 InspectorTest
.completeTest();
40 // nodeId isn't always the same, so set it to a known value if it's present
41 if (msg
.result
&& "accessibilityNode" in msg
.result
&& "nodeId" in msg
.result
.accessibilityNode
)
42 msg
.result
.accessibilityNode
.nodeId
= "3";
44 InspectorTest
.log('result: ' + JSON
.stringify(msg
.result
, null, " "));
45 InspectorTest
.completeTest();
51 <body onLoad=
"runTest();">
52 <input type=
"text"></input>