Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Side by Side Diff: LayoutTests/inspector/elements/inspect-pointer-events-none.html

Issue 218703002: DevTools: [wip] move Elements panel off WebInspector.domModel and single tree outline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment addressed (and much more) Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <style> 5 <style>
6 div { 6 div {
7 margin: 0; 7 margin: 0;
8 padding: 0; 8 padding: 0;
9 border: none; 9 border: none;
10 } 10 }
(...skipping 24 matching lines...) Expand all
35 window.eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + re ct.height / 2, withShift ? "shiftKey" : ""); 35 window.eventSender.mouseMoveTo(rect.left + rect.width / 2, rect.top + re ct.height / 2, withShift ? "shiftKey" : "");
36 window.eventSender.mouseDown(); 36 window.eventSender.mouseDown();
37 window.eventSender.mouseUp(); 37 window.eventSender.mouseUp();
38 } 38 }
39 } 39 }
40 40
41 function test() 41 function test()
42 { 42 {
43 function selectedNodeId() 43 function selectedNodeId()
44 { 44 {
45 var selectedElement = WebInspector.panels.elements.treeOutline.selectedT reeElement; 45 var selectedElement = InspectorTest.firstElementsTreeOutline().selectedT reeElement;
46 if (!selectedElement) 46 if (!selectedElement)
47 return "<no selected node>"; 47 return "<no selected node>";
48 return selectedElement.representedObject.getAttribute("id"); 48 return selectedElement.representedObject.getAttribute("id");
49 } 49 }
50 50
51 function expectSelectedNode(expectedId) 51 function expectSelectedNode(expectedId)
52 { 52 {
53 var id = selectedNodeId(); 53 var id = selectedNodeId();
54 if (id === expectedId) 54 if (id === expectedId)
55 InspectorTest.addResult("PASS: selected node with id '" + id + "'"); 55 InspectorTest.addResult("PASS: selected node with id '" + id + "'");
56 else 56 else
57 InspectorTest.addResult("FAIL: unexpected selection " + id); 57 InspectorTest.addResult("FAIL: unexpected selection " + id);
58 } 58 }
59 59
60 function step1() 60 function step1()
61 { 61 {
62 WebInspector.domModel.setInspectModeEnabled(true, false, step2); 62 WebInspector.domModel.setInspectModeEnabled(true, false, step2);
63 } 63 }
64 64
65 function step2() 65 function step2()
66 { 66 {
67 WebInspector.panels.elements.treeOutline.addEventListener(WebInspector.E lementsTreeOutline.Events.SelectedNodeChanged, step3); 67 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.E lementsTreeOutline.Events.SelectedNodeChanged, step3);
68 InspectorTest.evaluateInPage("clickInner(true)"); 68 InspectorTest.evaluateInPage("clickInner(true)");
69 } 69 }
70 70
71 function step3() 71 function step3()
72 { 72 {
73 WebInspector.panels.elements.treeOutline.removeEventListener(WebInspecto r.ElementsTreeOutline.Events.SelectedNodeChanged, step3); 73 InspectorTest.firstElementsTreeOutline().removeEventListener(WebInspecto r.ElementsTreeOutline.Events.SelectedNodeChanged, step3);
74 expectSelectedNode("inner"); 74 expectSelectedNode("inner");
75 WebInspector.domModel.setInspectModeEnabled(true, false, step4); 75 WebInspector.domModel.setInspectModeEnabled(true, false, step4);
76 } 76 }
77 77
78 function step4() 78 function step4()
79 { 79 {
80 WebInspector.panels.elements.treeOutline.addEventListener(WebInspector.E lementsTreeOutline.Events.SelectedNodeChanged, step5); 80 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.E lementsTreeOutline.Events.SelectedNodeChanged, step5);
81 InspectorTest.evaluateInPage("clickInner(false)"); 81 InspectorTest.evaluateInPage("clickInner(false)");
82 } 82 }
83 83
84 function step5() 84 function step5()
85 { 85 {
86 WebInspector.panels.elements.treeOutline.removeEventListener(WebInspecto r.ElementsTreeOutline.Events.SelectedNodeChanged, step5); 86 InspectorTest.firstElementsTreeOutline().removeEventListener(WebInspecto r.ElementsTreeOutline.Events.SelectedNodeChanged, step5);
87 expectSelectedNode("outer"); 87 expectSelectedNode("outer");
88 InspectorTest.completeTest(); 88 InspectorTest.completeTest();
89 } 89 }
90 90
91 WebInspector.inspectorView.showPanel("elements"); 91 WebInspector.inspectorView.showPanel("elements");
92 step1(); 92 step1();
93 } 93 }
94 94
95 </script> 95 </script>
96 </head> 96 </head>
97 97
98 <body onload="runTest()"> 98 <body onload="runTest()">
99 <p>Test that Web Inspector can inspect element with <code>pointer-events:none</c ode>. 99 <p>Test that Web Inspector can inspect element with <code>pointer-events:none</c ode>.
100 </p> 100 </p>
101 <div id="outer"><div id="inner"></div></div> 101 <div id="outer"><div id="inner"></div></div>
102 </body> 102 </body>
103 </html> 103 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698