| 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 var elementsPanel = WebInspector.inspectorView.showPanel("elements"); | 9 var elementsPanel = WebInspector.inspectorView.showPanel("elements"); |
| 10 elementsPanel.treeOutline.addEventListener(WebInspector.ElementsTreeOutline.
Events.SelectedNodeChanged, selectedNodeChanged); | 10 elementsPanel.treeOutline.addEventListener(WebInspector.ElementsTreeOutline.
Events.SelectedNodeChanged, selectedNodeChanged); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 | 26 |
| 27 InspectorTest.nodeWithId("nested-input", function(node) { | 27 InspectorTest.nodeWithId("nested-input", function(node) { |
| 28 node.shadowRoots()[0].getChildNodes(childrenCallback); | 28 node.shadowRoots()[0].getChildNodes(childrenCallback); |
| 29 | 29 |
| 30 function childrenCallback(children) | 30 function childrenCallback(children) |
| 31 { | 31 { |
| 32 var shadowDiv = children[0]; | 32 var shadowDiv = children[0]; |
| 33 InspectorTest.addResult("User-agent shadow DOM hidden:"); | 33 InspectorTest.addResult("User-agent shadow DOM hidden:"); |
| 34 elementsPanel.revealAndSelectNode(shadowDiv.id); | 34 elementsPanel.revealAndSelectNode(shadowDiv.id); |
| 35 WebInspector.settings.showShadowDOM.set(true); | 35 WebInspector.settings.showUAShadowDOM.set(true); |
| 36 InspectorTest.addResult("User-agent shadow DOM shown:"); | 36 InspectorTest.addResult("User-agent shadow DOM shown:"); |
| 37 elementsPanel.revealAndSelectNode(shadowDiv.id); | 37 elementsPanel.revealAndSelectNode(shadowDiv.id); |
| 38 } | 38 } |
| 39 }); | 39 }); |
| 40 } | 40 } |
| 41 </script> | 41 </script> |
| 42 </head> | 42 </head> |
| 43 | 43 |
| 44 <body onload="runTest()"> | 44 <body onload="runTest()"> |
| 45 | 45 |
| 46 <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 <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> |
| 47 | 47 |
| 48 <p id="test1"></p> | 48 <p id="test1"></p> |
| 49 | 49 |
| 50 <script> | 50 <script> |
| 51 var input = document.createElement("input"); | 51 var input = document.createElement("input"); |
| 52 input.id = "nested-input"; | 52 input.id = "nested-input"; |
| 53 input.value = "test"; | 53 input.value = "test"; |
| 54 test1.createShadowRoot().appendChild(input); | 54 test1.createShadowRoot().appendChild(input); |
| 55 </script> | 55 </script> |
| 56 | 56 |
| 57 </body> | 57 </body> |
| 58 </html> | 58 </html> |
| OLD | NEW |