| 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>
|
|
|