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 <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 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 }, | 38 }, |
39 | 39 |
40 function testToggleHideShortcutOn(next) | 40 function testToggleHideShortcutOn(next) |
41 { | 41 { |
42 treeOutline._toggleHideShortcut(parentNode, callback); | 42 treeOutline._toggleHideShortcut(parentNode, callback); |
43 | 43 |
44 function callback() | 44 function callback() |
45 { | 45 { |
46 InspectorTest.addResult("=== Added hide shortcut ==="); | 46 InspectorTest.addResult("=== Added hide shortcut ==="); |
47 WebInspector.cssModel.getComputedStyleAsync(parentNode.id, callb
ack2); | 47 InspectorTest.cssModel.getComputedStyleAsync(parentNode.id, call
back2); |
48 } | 48 } |
49 | 49 |
50 function callback2(style) | 50 function callback2(style) |
51 { | 51 { |
52 InspectorTest.addResult("=== Parent node is hidden ==="); | 52 InspectorTest.addResult("=== Parent node is hidden ==="); |
53 InspectorTest.addResult(style.getLiveProperty("visibility").prop
ertyText); | 53 InspectorTest.addResult(style.getLiveProperty("visibility").prop
ertyText); |
54 WebInspector.cssModel.getComputedStyleAsync(childNode.id, callba
ck3); | 54 InspectorTest.cssModel.getComputedStyleAsync(childNode.id, callb
ack3); |
55 } | 55 } |
56 | 56 |
57 function callback3(style) | 57 function callback3(style) |
58 { | 58 { |
59 InspectorTest.addResult("=== Child node is hidden ==="); | 59 InspectorTest.addResult("=== Child node is hidden ==="); |
60 InspectorTest.addResult(style.getLiveProperty("visibility").prop
ertyText); | 60 InspectorTest.addResult(style.getLiveProperty("visibility").prop
ertyText); |
61 next(); | 61 next(); |
62 } | 62 } |
63 }, | 63 }, |
64 | 64 |
65 function testToggleHideShortcutOff(next) | 65 function testToggleHideShortcutOff(next) |
66 { | 66 { |
67 treeOutline._toggleHideShortcut(parentNode, callback); | 67 treeOutline._toggleHideShortcut(parentNode, callback); |
68 | 68 |
69 function callback() | 69 function callback() |
70 { | 70 { |
71 InspectorTest.addResult("=== Removed hide shortcut ==="); | 71 InspectorTest.addResult("=== Removed hide shortcut ==="); |
72 WebInspector.cssModel.getComputedStyleAsync(parentNode.id, callb
ack2); | 72 InspectorTest.cssModel.getComputedStyleAsync(parentNode.id, call
back2); |
73 } | 73 } |
74 | 74 |
75 function callback2(style) | 75 function callback2(style) |
76 { | 76 { |
77 InspectorTest.addResult("=== Parent node is visible ==="); | 77 InspectorTest.addResult("=== Parent node is visible ==="); |
78 InspectorTest.addResult(style.getLiveProperty("visibility").prop
ertyText); | 78 InspectorTest.addResult(style.getLiveProperty("visibility").prop
ertyText); |
79 WebInspector.cssModel.getComputedStyleAsync(childNode.id, callba
ck3); | 79 InspectorTest.cssModel.getComputedStyleAsync(childNode.id, callb
ack3); |
80 } | 80 } |
81 | 81 |
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 |
(...skipping 17 matching lines...) Expand all Loading... |
107 testPseudoToggle(parentNode.afterPseudoElement(), 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 InspectorTest.cssModel.getComputedStyleAsync(frameNode.id, callb
ack2); |
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(pseudoNode, next) | 129 function testPseudoToggle(pseudoNode, next) |
130 { | 130 { |
131 treeOutline._toggleHideShortcut(pseudoNode, callback); | 131 treeOutline._toggleHideShortcut(pseudoNode, callback); |
132 | 132 |
133 function callback() | 133 function callback() |
134 { | 134 { |
135 WebInspector.cssModel.getComputedStyleAsync(pseudoNode.id, callback2
); | 135 InspectorTest.cssModel.getComputedStyleAsync(pseudoNode.id, callback
2); |
136 } | 136 } |
137 | 137 |
138 function callback2(style) | 138 function callback2(style) |
139 { | 139 { |
140 InspectorTest.addResult("::" + pseudoNode.pseudoType() + " node visi
bility: '" + style.getLiveProperty("visibility").value + "'"); | 140 InspectorTest.addResult("::" + pseudoNode.pseudoType() + " node visi
bility: '" + style.getLiveProperty("visibility").value + "'"); |
141 next(); | 141 next(); |
142 } | 142 } |
143 } | 143 } |
144 } | 144 } |
145 </script> | 145 </script> |
(...skipping 17 matching lines...) Expand all Loading... |
163 <div id="parent-node">parent | 163 <div id="parent-node">parent |
164 <div style="visibility:hidden">hidden | 164 <div style="visibility:hidden">hidden |
165 <div id="child-node" style="visibility:visible">child</div> | 165 <div id="child-node" style="visibility:visible">child</div> |
166 </div> | 166 </div> |
167 </div> | 167 </div> |
168 | 168 |
169 <iframe src="resources/hide-shortcut-iframe.html" onload="runTest()"> | 169 <iframe src="resources/hide-shortcut-iframe.html" onload="runTest()"> |
170 | 170 |
171 </body> | 171 </body> |
172 </html> | 172 </html> |
OLD | NEW |