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

Unified 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, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
index 989710e80e084156d39f2d6ceaa241f3bea4dc53..f14913e1d953177ee90ebdf069ce6cd3d4b552be 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/css-protocol-test.js
@@ -131,6 +131,7 @@ InspectorTest.loadAndDumpMatchingRulesForNode = function(nodeId, callback, omitL
InspectorTest.dumpStyle(inheritedEntry.inlineStyle);
dumpRuleMatches(inheritedEntry.matchedCSSRules);
}
+ dumpKeyframesRules(result.cssKeyframesRules);
callback();
}
@@ -145,6 +146,26 @@ InspectorTest.loadAndDumpMatchingRulesForNode = function(nodeId, callback, omitL
}
}
+InspectorTest.loadAndDumpCSSAnimationsForNode = function(nodeId, callback)
+{
+ InspectorTest.sendCommandOrDie("CSS.getCSSAnimationsForNode", { "nodeId": nodeId }, cssAnimationsLoaded);
+
+ function cssAnimationsLoaded(result)
+ {
+ InspectorTest.log("Dumping CSS keyframed animations: ");
+ for (var keyframesRule of result.cssKeyframesRules) {
+ InspectorTest.log("@keyframes " + keyframesRule.name + " {");
+ for (var keyframe of keyframesRule.keyframes) {
+ indentLog(4, keyframe.keyText + " {");
+ InspectorTest.dumpStyle(keyframe.style, 4);
+ indentLog(4, "}");
+ }
+ InspectorTest.log("}");
+ }
+ callback();
+ }
+}
+
InspectorTest.loadAndDumpMatchingRules = function(documentNodeId, selector, callback, omitLog)
{
InspectorTest.requestNodeId(documentNodeId, selector, nodeIdLoaded);

Powered by Google App Engine
This is Rietveld 408576698