| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-prot
ocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/dom-prot
ocol-test.js"></script> |
| 4 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 4 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 5 <script type="text/javascript" src="accessibility-dumpAccessibilityNodes.js"></s
cript> | 5 <script type="text/javascript" src="accessibility-dumpAccessibilityNodes.js"></s
cript> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 InspectorTest.sendCommand("DOM.getDocument", {}, InspectorTest.dumpAccessibi
lityNodesBySelectorAndCompleteTest.bind(null, '[data-dump]')); | 10 InspectorTest.sendCommand("DOM.getDocument", |
| 11 {}, |
| 12 (result) => { |
| 13 InspectorTest.dumpAccessibilityNodesBySelectorAndCompleteTest('[data-dum
p]', true, result); |
| 14 }); |
| 11 } | 15 } |
| 12 </script> | 16 </script> |
| 13 </head> | 17 </head> |
| 14 <body onLoad="runTest();"> | 18 <body onLoad="runTest();"> |
| 15 <div data-dump>Non-hidden div for comparison</div> | 19 <div>Non-hidden div for comparison</div> |
| 16 <div role="tree"> | 20 <div role="tree"> |
| 17 <div data-dump role="treeitem">non-hidden treeitem</div> | 21 <div role="treeitem">non-hidden treeitem</div> |
| 18 <div data-dump >hidden non-treeitem</div> | 22 <div data-dump >hidden non-treeitem</div> |
| 19 </div> | 23 </div> |
| 20 <div role="img"> | 24 <div role="img"> |
| 21 <svg data-dump> | 25 <svg data-dump> |
| 22 <!-- Children of img role are presentational --> | 26 <!-- Children of img role are presentational --> |
| 23 <circle xmlns:svg="http://www.w3.org/2000/svg" cx="150px" cy="100px"
r="50px" fill="#ff0000" stroke="#000000" stroke-width="5px"/> | 27 <circle xmlns:svg="http://www.w3.org/2000/svg" cx="150px" cy="100px"
r="50px" fill="#ff0000" stroke="#000000" stroke-width="5px"/> |
| 24 </svg> | 28 </svg> |
| 25 </div> | 29 </div> |
| 26 <button> | 30 <button> |
| 27 <span data-dump>Buttons are leaf nodes</span> | 31 <span data-dump>Buttons are leaf nodes</span> |
| 28 </button> | 32 </button> |
| 29 <div data-dump aria-hidden="true"> | 33 <div data-dump aria-hidden="true"> |
| 30 <div data-dump>Descendant of aria-hidden node</div> | 34 <div data-dump>Descendant of aria-hidden node</div> |
| 31 </div> | 35 </div> |
| 32 <img data-dump alt="" src="foo.png"> | |
| 33 <ol role="none" data-dump><!-- list is presentational --> | 36 <ol role="none" data-dump><!-- list is presentational --> |
| 34 <li data-dump>List item also presentational</li> | 37 <li data-dump>List item also presentational</li> |
| 35 <div data-dump>Div in list isn't presentational</div> | 38 <div data-dump>Div in list isn't presentational</div> |
| 36 </ol> | 39 </ol> |
| 37 | 40 |
| 38 <label for="checkbox" data-dump><span data-dump>Content within label refers
to label container</span></label> | 41 <label for="checkbox" data-dump><span data-dump>Content within label refers
to label container</span></label> |
| 39 <input type="checkbox" id="checkbox"> | 42 <input type="checkbox" id="checkbox"> |
| 43 <div style="display: none" data-dump> |
| 44 Non-rendered div |
| 45 <span data-dump>Span within non-rendered div</span> |
| 46 <button aria-hidden="false">aria-hidden false button</button> |
| 47 </div> |
| 40 | 48 |
| 41 <div style="display: none" data-dump>Non-rendered div</div> | 49 <canvas style="height: 1px; width: 1px;" data-dump></canvas> |
| 42 | 50 |
| 43 <canvas style="height: 1px; width: 1px;q" data-dump></canvas> | 51 <canvas role="presentation" data-dump><div>Canvas fallback content</div></ca
nvas> |
| 52 |
| 44 </body> | 53 </body> |
| 45 </html> | 54 </html> |
| OLD | NEW |