3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/elements-test.js"></script>
10 var target
= document
.getElementById("host");
11 var rect
= target
.getBoundingClientRect();
12 // Simulate the mouse click over the target to trigger an event dispatch.
13 if (window
.eventSender
) {
14 window
.eventSender
.mouseMoveTo(rect
.left
+ 10, rect
.top
+ 10);
15 window
.eventSender
.mouseDown();
16 window
.eventSender
.mouseUp();
22 InspectorTest
.domModel
.setInspectMode(DOMAgent
.InspectMode
.SearchForNode
, step2
);
26 InspectorTest
.firstElementsTreeOutline().addEventListener(WebInspector
.ElementsTreeOutline
.Events
.SelectedNodeChanged
, step3
);
27 InspectorTest
.evaluateInPage("click()");
32 InspectorTest
.firstElementsTreeOutline().removeEventListener(WebInspector
.ElementsTreeOutline
.Events
.SelectedNodeChanged
, step3
);
33 var selectedElement
= InspectorTest
.firstElementsTreeOutline().selectedTreeElement
;
34 InspectorTest
.addResult("Node selected: " + selectedElement
.node().getAttribute("id"));
35 InspectorTest
.completeTest();
42 <body onload=
"runTest()">
44 <p>Test that devtools can inspect text element under shadow root.
</p>
46 <div><div><div id=
"host"></div></div></div>
48 var host
= document
.querySelector('#host');
49 var sr
= host
.createShadowRoot();
50 sr
.innerHTML
= "Text Text Text<br>Text Text Text";