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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html

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, 2 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/inspector-protocol/css/css-get-keyframes.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html
new file mode 100644
index 0000000000000000000000000000000000000000..c35c5164d8325543665b8ee9572d18cccfe87538
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/css/css-get-keyframes.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/css-protocol-test.js"></script>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/dom-protocol-test.js"></script>
+<link rel="stylesheet" type="text/css" href="resources/keyframes.css"></link>
+<script type="text/javascript">
+function test()
+{
+ InspectorTest.sendCommandOrDie("DOM.enable", {});
+ InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled);
+
+ function onCSSEnabled()
+ {
+ InspectorTest.sendCommandOrDie("DOM.getDocument", {}, onDocumentId);
+ }
+
+ function onDocumentId(result)
+ {
+ documentNodeId = result.root.nodeId;
+ InspectorTest.requestNodeId(documentNodeId, "#element", onNodeId);
+ }
+
+ function onNodeId(nodeId)
+ {
+ InspectorTest.loadAndDumpCSSAnimationsForNode(nodeId, InspectorTest.completeTest.bind(InspectorTest));
+ }
+}
+</script>
+<style>
+#element {
+ animation: animName 1s 2s, mediaAnim 2s, doesNotExist 3s, styleSheetAnim 0s;
+}
+
+@keyframes animName {
+ from {
+ width: 100px;
+ }
+ 10% {
+ width: 150px;
+ }
+ 100% {
+ width: 200px;
+ }
+}
+
+@media (min-width: 1px) {
+ @keyframes mediaAnim {
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
+ }
+}
+
+</style>
+</head>
+<body onload="runTest()">
+ <div id="element"></div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698