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

Side by Side Diff: LayoutTests/inspector/elements/hide-shortcut.html

Issue 720793003: DevTools: Replace visibleChildrenCount with hasVisibleChildren in ElementsTreeOutline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Created 6 years, 1 month 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 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var treeOutline; 9 var treeOutline;
10 var parentNode; 10 var parentNode;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 function callback3(style) 82 function callback3(style)
83 { 83 {
84 InspectorTest.addResult("=== Child node is visible ==="); 84 InspectorTest.addResult("=== Child node is visible ===");
85 InspectorTest.addResult(style.getLiveProperty("visibility").prop ertyText); 85 InspectorTest.addResult(style.getLiveProperty("visibility").prop ertyText);
86 next(); 86 next();
87 } 87 }
88 }, 88 },
89 89
90 function testToggleHideBeforePseudoShortcutOn(next) 90 function testToggleHideBeforePseudoShortcutOn(next)
91 { 91 {
92 testPseudoToggle(WebInspector.DOMNode.PseudoElementNames.Before, nex t); 92 testPseudoToggle(parentNode.beforePseudoElement(), next);
93 }, 93 },
94 94
95 function testToggleHideAfterPseudoShortcutOn(next) 95 function testToggleHideAfterPseudoShortcutOn(next)
96 { 96 {
97 testPseudoToggle(WebInspector.DOMNode.PseudoElementNames.After, next ); 97 testPseudoToggle(parentNode.afterPseudoElement(), next);
98 }, 98 },
99 99
100 function testToggleHideBeforePseudoShortcutOff(next) 100 function testToggleHideBeforePseudoShortcutOff(next)
101 { 101 {
102 testPseudoToggle(WebInspector.DOMNode.PseudoElementNames.Before, nex t); 102 testPseudoToggle(parentNode.beforePseudoElement(), next);
103 }, 103 },
104 104
105 function testToggleHideAfterPseudoShortcutOff(next) 105 function testToggleHideAfterPseudoShortcutOff(next)
106 { 106 {
107 testPseudoToggle(WebInspector.DOMNode.PseudoElementNames.After, next ); 107 testPseudoToggle(parentNode.afterPseudoElement(), next);
108 }, 108 },
109 109
110 function testToggleHideShortcutOnInFrame(next) 110 function testToggleHideShortcutOnInFrame(next)
111 { 111 {
112 treeOutline._toggleHideShortcut(frameNode, callback); 112 treeOutline._toggleHideShortcut(frameNode, callback);
113 113
114 function callback() 114 function callback()
115 { 115 {
116 InspectorTest.addResult("=== Added hide shortcut in frame ==="); 116 InspectorTest.addResult("=== Added hide shortcut in frame ===");
117 WebInspector.cssModel.getComputedStyleAsync(frameNode.id, callba ck2); 117 WebInspector.cssModel.getComputedStyleAsync(frameNode.id, callba ck2);
118 } 118 }
119 119
120 function callback2(style) 120 function callback2(style)
121 { 121 {
122 InspectorTest.addResult("=== Frame node is hidden ==="); 122 InspectorTest.addResult("=== Frame node is hidden ===");
123 InspectorTest.addResult(style.getLiveProperty("visibility").prop ertyText); 123 InspectorTest.addResult(style.getLiveProperty("visibility").prop ertyText);
124 next(); 124 next();
125 } 125 }
126 } 126 }
127 ]); 127 ]);
128 128
129 function testPseudoToggle(pseudoType, next) 129 function testPseudoToggle(pseudoNode, next)
130 { 130 {
131 var pseudoNode = parentNode.pseudoElements()[pseudoType];
132 treeOutline._toggleHideShortcut(pseudoNode, callback); 131 treeOutline._toggleHideShortcut(pseudoNode, callback);
133 132
134 function callback() 133 function callback()
135 { 134 {
136 WebInspector.cssModel.getComputedStyleAsync(pseudoNode.id, callback2 ); 135 WebInspector.cssModel.getComputedStyleAsync(pseudoNode.id, callback2 );
137 } 136 }
138 137
139 function callback2(style) 138 function callback2(style)
140 { 139 {
141 InspectorTest.addResult("::" + pseudoType + " node visibility: '" + style.getLiveProperty("visibility").value + "'"); 140 InspectorTest.addResult("::" + pseudoNode.pseudoType() + " node visi bility: '" + style.getLiveProperty("visibility").value + "'");
142 next(); 141 next();
143 } 142 }
144 } 143 }
145 } 144 }
146 </script> 145 </script>
147 <style> 146 <style>
148 #parent-node::before { 147 #parent-node::before {
149 content: "before"; 148 content: "before";
150 } 149 }
151 150
(...skipping 12 matching lines...) Expand all
164 <div id="parent-node">parent 163 <div id="parent-node">parent
165 <div style="visibility:hidden">hidden 164 <div style="visibility:hidden">hidden
166 <div id="child-node" style="visibility:visible">child</div> 165 <div id="child-node" style="visibility:visible">child</div>
167 </div> 166 </div>
168 </div> 167 </div>
169 168
170 <iframe src="resources/hide-shortcut-iframe.html" onload="runTest()"> 169 <iframe src="resources/hide-shortcut-iframe.html" onload="runTest()">
171 170
172 </body> 171 </body>
173 </html> 172 </html>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/elements-test.js ('k') | LayoutTests/inspector/elements/styles/pseudo-elements.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698