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

Unified Diff: LayoutTests/inspector-protocol/animation/animation-multiple-frames.html

Issue 1081753002: Devtools Animations: Support multiple frames in the animation timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: New frame instrumentation on agent Created 5 years, 8 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-protocol/animation/animation-multiple-frames.html
diff --git a/LayoutTests/inspector-protocol/animation/animation-multiple-frames.html b/LayoutTests/inspector-protocol/animation/animation-multiple-frames.html
new file mode 100644
index 0000000000000000000000000000000000000000..d6efebb8a4cb16dfa869363a1e0d4f12725ba418
--- /dev/null
+++ b/LayoutTests/inspector-protocol/animation/animation-multiple-frames.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+function appendIframe()
+{
+ var frame = document.createElement("iframe");
+ frame.src = "../resources/test-page-trigger-animation.html";
+ document.body.appendChild(frame);
+}
+
+function test()
+{
+ InspectorTest.eventHandler["Animation.animationPlayerCreated"] = onCreated;
+ InspectorTest.sendCommand("Animation.enable", {});
+ InspectorTest.evaluateInPage("appendIframe()", frameAttached);
+ var numberAnimationsCaptured = 0;
+ var lastStartTime = undefined;
+
+ function frameAttached()
+ {
+ InspectorTest.log("Frame appended");
+ }
+
+ function onCreated(data)
+ {
+ var player = data.params.player;
+
+ if (!lastStartTime || player.startTime > lastStartTime)
+ InspectorTest.log("Animation created: start time is valid");
+ lastStartTime = player.startTime;
+ numberAnimationsCaptured++;
+
+ if (numberAnimationsCaptured < 10)
+ InspectorTest.evaluateInPage("appendIframe()", frameAttached);
+ else
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698