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 | 5 |
6 <script> | 6 <script> |
7 | 7 |
8 function click() | 8 function click() |
9 { | 9 { |
10 var target = document.getElementById("host"); | 10 var target = document.getElementById("host"); |
11 var rect = target.getBoundingClientRect(); | 11 var rect = target.getBoundingClientRect(); |
12 // Simulate the mouse click over the target to trigger an event dispatch. | 12 // Simulate the mouse click over the target to trigger an event dispatch. |
13 if (window.eventSender) { | 13 if (window.eventSender) { |
14 window.eventSender.mouseMoveTo(rect.left + 10, rect.top + 10); | 14 window.eventSender.mouseMoveTo(rect.left + 10, rect.top + 10); |
15 window.eventSender.mouseDown(); | 15 window.eventSender.mouseDown(); |
16 window.eventSender.mouseUp(); | 16 window.eventSender.mouseUp(); |
17 } | 17 } |
18 } | 18 } |
19 | 19 |
20 function test() | 20 function test() |
21 { | 21 { |
22 InspectorTest.overlayModel.setInspectMode(Protocol.Overlay.InspectMode.Searc
hForNode).then(step2); | 22 InspectorTest.domModel.setInspectMode(Protocol.DOM.InspectMode.SearchForNode
, step2); |
23 | 23 |
24 function step2() | 24 function step2() |
25 { | 25 { |
26 InspectorTest.firstElementsTreeOutline().addEventListener(Elements.Eleme
ntsTreeOutline.Events.SelectedNodeChanged, step3); | 26 InspectorTest.firstElementsTreeOutline().addEventListener(Elements.Eleme
ntsTreeOutline.Events.SelectedNodeChanged, step3); |
27 InspectorTest.evaluateInPage("click()"); | 27 InspectorTest.evaluateInPage("click()"); |
28 } | 28 } |
29 | 29 |
30 function step3() | 30 function step3() |
31 { | 31 { |
32 InspectorTest.firstElementsTreeOutline().removeEventListener(Elements.El
ementsTreeOutline.Events.SelectedNodeChanged, step3); | 32 InspectorTest.firstElementsTreeOutline().removeEventListener(Elements.El
ementsTreeOutline.Events.SelectedNodeChanged, step3); |
(...skipping 12 matching lines...) Loading... |
45 | 45 |
46 <div><div><div id="host"></div></div></div> | 46 <div><div><div id="host"></div></div></div> |
47 <script> | 47 <script> |
48 var host = document.querySelector('#host'); | 48 var host = document.querySelector('#host'); |
49 var sr = host.createShadowRoot(); | 49 var sr = host.createShadowRoot(); |
50 sr.innerHTML = "Text Text Text<br>Text Text Text"; | 50 sr.innerHTML = "Text Text Text<br>Text Text Text"; |
51 </script> | 51 </script> |
52 | 52 |
53 </body> | 53 </body> |
54 </html> | 54 </html> |
OLD | NEW |