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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js

Issue 1371723002: Devtools Animations: Add method to fetch CSS keyframed animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698