Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / inspect-mode-shadow-text.html
blobb181dd427f217a482db266ac863f96f2214cdb61
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/elements-test.js"></script>
6 <script>
8 function click()
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();
20 function test()
22 InspectorTest.domModel.setInspectMode(DOMAgent.InspectMode.SearchForNode, step2);
24 function step2()
26 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.ElementsTreeOutline.Events.SelectedNodeChanged, step3);
27 InspectorTest.evaluateInPage("click()");
30 function step3()
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();
39 </script>
40 </head>
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>
47 <script>
48 var host = document.querySelector('#host');
49 var sr = host.createShadowRoot();
50 sr.innerHTML = "Text Text Text<br>Text Text Text";
51 </script>
53 </body>
54 </html>