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

Unified Diff: LayoutTests/inspector/elements/animation-timeline.html

Issue 967213002: Devtools Animations: Represent delay and end-delay on the animation timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test Created 5 years, 10 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: LayoutTests/inspector/elements/animation-timeline.html
diff --git a/LayoutTests/inspector/elements/animation-timeline.html b/LayoutTests/inspector/elements/animation-timeline.html
new file mode 100644
index 0000000000000000000000000000000000000000..a314a29aca2b7a81c514256f7c4ae3c5e8b1630b
--- /dev/null
+++ b/LayoutTests/inspector/elements/animation-timeline.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/elements-test.js"></script>
+<script>
+function documentClickHandler(event) { console.log("click - document - attribute"); }
+
+function test()
+{
+ InspectorTest.selectNodeWithId("node", animationStartDelay);
+ var sidebarPane = WebInspector.panels.elements.sidebarPanes.animations;
+ // Override timeline width for testing
+ WebInspector.AnimationTimeline.prototype.width = function() { return 500; }
+
+ function animationStartDelay()
+ {
+ var animation = {"id":"9","pausedState":false,"playState":"running","playbackRate":1,"startTime":1013.51700001396,"currentTime":16.6666667209938,"source":{"delay":250,"endDelay":0,"playbackRate":1,"iterationStart":0,"iterations":1,"duration":1000,"direction":"normal","fill":"none","name":"","backendNodeId":1,"easing":"linear","keyframesRule":{"keyframes":[{"offset":"0%","style":{"cssProperties":[{"name":"transform","value":"translateX(0px)"}],"shorthandEntries":[]},"easing":"linear"},{"offset":"100%","style":{"cssProperties":[{"name":"transform","value":"translateX(100px)"}],"shorthandEntries":[]},"easing":"linear"}]}},"type":"WebAnimation"};
pfeldman 2015/03/03 12:44:15 Why is this information not coming from the backen
samli 2015/03/03 21:13:32 I couldn't figure a way to reliably trigger an ani
pfeldman 2015/03/04 12:54:03 I am sure you can kick the animation programmatica
+ var player = WebInspector.AnimationModel.AnimationPlayer.parsePayload(WebInspector.targetManager.mainTarget(), animation);
+ player.source().nodeId = sidebarPane.node().id;
+ sidebarPane._timeline.addAnimation(player, true);
+ InspectorTest.dumpAnimationTimeline(animationBothDelay);
+ }
+
+ function animationBothDelay()
+ {
+ var animation = {"id":"2","pausedState":false,"playState":"running","playbackRate":1,"startTime":1167.00433334336,"currentTime":0,"source":{"delay":300,"endDelay":100,"playbackRate":1,"iterationStart":0,"iterations":1,"duration":250,"direction":"normal","fill":"none","name":"","backendNodeId":8,"easing":"linear","keyframesRule":{"keyframes":[{"offset":"0%","style":{"cssProperties":[{"name":"width","value":"100px"}],"shorthandEntries":[]},"easing":"linear"},{"offset":"100%","style":{"cssProperties":[{"name":"width","value":"700px"}],"shorthandEntries":[]},"easing":"linear"}]}},"type":"WebAnimation"};
+ var player = WebInspector.AnimationModel.AnimationPlayer.parsePayload(WebInspector.targetManager.mainTarget(), animation);
+ player.source().nodeId = sidebarPane.node().id;
+ sidebarPane._timeline.addAnimation(player, true);
+ InspectorTest.dumpAnimationTimeline(InspectorTest.completeTest);
+ }
+}
+
+</script>
+</head>
+
+<body onload="runtest()">
+<p>
+Tests the display of animations on the animation timeline.
+</p>
+
+<div id="node"></div>
+
+</body>
+</html>
« no previous file with comments | « LayoutTests/http/tests/inspector/elements-test.js ('k') | LayoutTests/inspector/elements/animation-timeline-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698