| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../../http/tests/inspector/console-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/elements-test.js"></script> | 5 <script src="../../../http/tests/inspector/elements-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function test() | 8 function test() |
| 9 { | 9 { |
| 10 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.Eleme
ntsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged); | 10 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.Eleme
ntsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged); |
| 11 | 11 |
| 12 var tests = [ | 12 var tests = [ |
| 13 ["shadow", "inspect(host.shadowRoot.firstChild.firstChild.firstChild)"], | 13 ["shadow", "inspect(host.shadowRoot.firstChild.firstChild.firstChild)"], |
| 14 ["shadow-open", "inspect(hostOpen.shadowRoot.firstChild.firstChild.first
Child)"] | 14 ["shadow-open", "inspect(hostOpen.shadowRoot.firstChild.firstChild.first
Child)"] |
| 15 ]; | 15 ]; |
| 16 | 16 |
| 17 function selectedNodeChanged(event) | 17 function selectedNodeChanged(event) |
| 18 { | 18 { |
| 19 var node = event.data; | 19 var node = event.data.node; |
| 20 if (!node) | 20 if (!node) |
| 21 return; | 21 return; |
| 22 if (node.getAttribute("id") == tests[0][0]) { | 22 if (node.getAttribute("id") == tests[0][0]) { |
| 23 InspectorTest.addResult(WebInspector.DOMPresentationUtils.xPath(node
, false)); | 23 InspectorTest.addResult(WebInspector.DOMPresentationUtils.xPath(node
, false)); |
| 24 tests.shift(); | 24 tests.shift(); |
| 25 nextTest(); | 25 nextTest(); |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| 29 function nextTest() | 29 function nextTest() |
| (...skipping 23 matching lines...) Expand all Loading... |
| 53 </div> | 53 </div> |
| 54 </div> | 54 </div> |
| 55 | 55 |
| 56 <script> | 56 <script> |
| 57 document.querySelector('#host').createShadowRoot().innerHTML = "<div><div><s
pan id='shadow'>Shadow</span></div></div>"; | 57 document.querySelector('#host').createShadowRoot().innerHTML = "<div><div><s
pan id='shadow'>Shadow</span></div></div>"; |
| 58 document.querySelector('#hostOpen').attachShadow({ mode: "open" }).innerHTML
= "<div><div><span id='shadow-open'>Shadow</span></div></div>"; | 58 document.querySelector('#hostOpen').attachShadow({ mode: "open" }).innerHTML
= "<div><div><span id='shadow-open'>Shadow</span></div></div>"; |
| 59 </script> | 59 </script> |
| 60 | 60 |
| 61 </body> | 61 </body> |
| 62 </html> | 62 </html> |
| OLD | NEW |