OLD | NEW |
1 function initialize_cssTest() | 1 function initialize_cssTest() |
2 { | 2 { |
3 | 3 |
4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback) | 4 InspectorTest.dumpStyleSheetText = function(styleSheetId, callback) |
5 { | 5 { |
6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl
eSheetId }, onStyleSheetText); | 6 InspectorTest.sendCommandOrDie("CSS.getStyleSheetText", { styleSheetId: styl
eSheetId }, onStyleSheetText); |
7 function onStyleSheetText(result) | 7 function onStyleSheetText(result) |
8 { | 8 { |
9 InspectorTest.log("==== Style sheet text ===="); | 9 InspectorTest.log("==== Style sheet text ===="); |
10 InspectorTest.log(result.text); | 10 InspectorTest.log(result.text); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 { | 138 { |
139 for (var ruleMatch of ruleMatches) { | 139 for (var ruleMatch of ruleMatches) { |
140 var origin = ruleMatch.rule.origin; | 140 var origin = ruleMatch.rule.origin; |
141 if (origin !== "inspector" && origin !== "regular") | 141 if (origin !== "inspector" && origin !== "regular") |
142 continue; | 142 continue; |
143 InspectorTest.dumpRuleMatch(ruleMatch); | 143 InspectorTest.dumpRuleMatch(ruleMatch); |
144 } | 144 } |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
| 148 InspectorTest.loadAndDumpCSSAnimationsForNode = function(nodeId, callback) |
| 149 { |
| 150 InspectorTest.sendCommandOrDie("CSS.getCSSAnimationsForNode", { "nodeId": no
deId }, cssAnimationsLoaded); |
| 151 |
| 152 function cssAnimationsLoaded(result) |
| 153 { |
| 154 InspectorTest.log("Dumping CSS keyframed animations: "); |
| 155 for (var keyframesRule of result.cssKeyframesRules) { |
| 156 InspectorTest.log("@keyframes " + keyframesRule.animationName + " {"
); |
| 157 for (var keyframe of keyframesRule.keyframes) { |
| 158 indentLog(4, keyframe.keyText + " {"); |
| 159 InspectorTest.dumpStyle(keyframe.style, 4); |
| 160 indentLog(4, "}"); |
| 161 } |
| 162 InspectorTest.log("}"); |
| 163 } |
| 164 callback(); |
| 165 } |
| 166 } |
| 167 |
148 InspectorTest.loadAndDumpMatchingRules = function(documentNodeId, selector, call
back, omitLog) | 168 InspectorTest.loadAndDumpMatchingRules = function(documentNodeId, selector, call
back, omitLog) |
149 { | 169 { |
150 InspectorTest.requestNodeId(documentNodeId, selector, nodeIdLoaded); | 170 InspectorTest.requestNodeId(documentNodeId, selector, nodeIdLoaded); |
151 | 171 |
152 function nodeIdLoaded(nodeId) | 172 function nodeIdLoaded(nodeId) |
153 { | 173 { |
154 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog)
; | 174 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog)
; |
155 } | 175 } |
156 } | 176 } |
157 | 177 |
(...skipping 11 matching lines...) Expand all Loading... |
169 { | 189 { |
170 if (!omitLog) | 190 if (!omitLog) |
171 InspectorTest.log("Dumping inline style: "); | 191 InspectorTest.log("Dumping inline style: "); |
172 InspectorTest.log("{"); | 192 InspectorTest.log("{"); |
173 InspectorTest.dumpStyle(result.inlineStyle, 0); | 193 InspectorTest.dumpStyle(result.inlineStyle, 0); |
174 InspectorTest.log("}"); | 194 InspectorTest.log("}"); |
175 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) | 195 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) |
176 } | 196 } |
177 } | 197 } |
178 } | 198 } |
OLD | NEW |