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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) | 148 InspectorTest.loadAndDumpCSSAnimationsForNode = function(nodeId, callback) |
149 { | 149 { |
150 InspectorTest.sendCommandOrDie("CSS.getCSSAnimationsForNode", { "nodeId": no
deId }, cssAnimationsLoaded); | 150 InspectorTest.sendCommandOrDie("CSS.getMatchedStylesForNode", { "nodeId": no
deId }, cssAnimationsLoaded); |
151 | 151 |
152 function cssAnimationsLoaded(result) | 152 function cssAnimationsLoaded(result) |
153 { | 153 { |
154 InspectorTest.log("Dumping CSS keyframed animations: "); | 154 InspectorTest.log("Dumping CSS keyframed animations: "); |
155 for (var keyframesRule of result.cssKeyframesRules) { | 155 for (var keyframesRule of result.cssKeyframesRules) { |
156 InspectorTest.log("@keyframes " + keyframesRule.animationName.text +
" {"); | 156 InspectorTest.log("@keyframes " + keyframesRule.animationName.text +
" {"); |
157 for (var keyframe of keyframesRule.keyframes) { | 157 for (var keyframe of keyframesRule.keyframes) { |
158 indentLog(4, keyframe.keyText.text + " {"); | 158 indentLog(4, keyframe.keyText.text + " {"); |
159 InspectorTest.dumpStyle(keyframe.style, 4); | 159 InspectorTest.dumpStyle(keyframe.style, 4); |
160 indentLog(4, "}"); | 160 indentLog(4, "}"); |
(...skipping 28 matching lines...) Expand all Loading... |
189 { | 189 { |
190 if (!omitLog) | 190 if (!omitLog) |
191 InspectorTest.log("Dumping inline style: "); | 191 InspectorTest.log("Dumping inline style: "); |
192 InspectorTest.log("{"); | 192 InspectorTest.log("{"); |
193 InspectorTest.dumpStyle(result.inlineStyle, 0); | 193 InspectorTest.dumpStyle(result.inlineStyle, 0); |
194 InspectorTest.log("}"); | 194 InspectorTest.log("}"); |
195 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) | 195 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, callback, omitLog) |
196 } | 196 } |
197 } | 197 } |
198 } | 198 } |
OLD | NEW |