| 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/elements-test.js"></script> | 4 <script src="../../http/tests/inspector/elements-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.Eleme
ntsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged); | 9 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.Eleme
ntsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged); |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 return "(in " + (node.ancestorUserAgentShadowRoot() ? "user-agent" : "au
thor") + " shadow DOM)"; | 23 return "(in " + (node.ancestorUserAgentShadowRoot() ? "user-agent" : "au
thor") + " shadow DOM)"; |
| 24 } | 24 } |
| 25 | 25 |
| 26 InspectorTest.nodeWithId("nested-input", function(node) { | 26 InspectorTest.nodeWithId("nested-input", function(node) { |
| 27 node.shadowRoots()[0].getChildNodes(childrenCallback); | 27 node.shadowRoots()[0].getChildNodes(childrenCallback); |
| 28 | 28 |
| 29 function childrenCallback(children) | 29 function childrenCallback(children) |
| 30 { | 30 { |
| 31 var shadowDiv = children[0]; | 31 var shadowDiv = children[0]; |
| 32 InspectorTest.addResult("User-agent shadow DOM hidden:"); | 32 InspectorTest.addResult("User-agent shadow DOM hidden:"); |
| 33 WebInspector.panels.elements.revealAndSelectNode(shadowDiv); | 33 WebInspector.inspectorView.panel("elements").revealAndSelectNode(sha
dowDiv); |
| 34 WebInspector.settings.showUAShadowDOM.set(true); | 34 WebInspector.settings.showUAShadowDOM.set(true); |
| 35 InspectorTest.addResult("User-agent shadow DOM shown:"); | 35 InspectorTest.addResult("User-agent shadow DOM shown:"); |
| 36 WebInspector.panels.elements.revealAndSelectNode(shadowDiv); | 36 WebInspector.inspectorView.panel("elements").revealAndSelectNode(sha
dowDiv); |
| 37 } | 37 } |
| 38 }); | 38 }); |
| 39 } | 39 } |
| 40 </script> | 40 </script> |
| 41 </head> | 41 </head> |
| 42 | 42 |
| 43 <body onload="runTest()"> | 43 <body onload="runTest()"> |
| 44 | 44 |
| 45 <p id="description">This test verifies that the correct node is revealed in the
DOM tree when asked to reveal a user-agent shadow DOM node.</p> | 45 <p id="description">This test verifies that the correct node is revealed in the
DOM tree when asked to reveal a user-agent shadow DOM node.</p> |
| 46 | 46 |
| 47 <p id="test1"></p> | 47 <p id="test1"></p> |
| 48 | 48 |
| 49 <script> | 49 <script> |
| 50 var input = document.createElement("input"); | 50 var input = document.createElement("input"); |
| 51 input.id = "nested-input"; | 51 input.id = "nested-input"; |
| 52 input.value = "test"; | 52 input.value = "test"; |
| 53 test1.createShadowRoot().appendChild(input); | 53 test1.createShadowRoot().appendChild(input); |
| 54 </script> | 54 </script> |
| 55 | 55 |
| 56 </body> | 56 </body> |
| 57 </html> | 57 </html> |
| OLD | NEW |