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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html

Issue 1422713012: Devtools Animations: Listen to all animation play state changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/animation/animation-zero-duration.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-cancel.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html
similarity index 62%
rename from third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-cancel.html
rename to third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html
index e11053f9dedebe172a3a63e70ba6abd3637f626a..fff98a1e1f63b441af033f960a7f3d271e0c6394 100644
--- a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-create-cancel.html
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-zero-duration.html
@@ -1,24 +1,30 @@
<html>
<head>
<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
-<script>
-
-var player;
+<style type="text/css">
+#node.anim {
+ animation: anim 0 ease-in-out;
+}
-function startAnimation()
-{
- player = node.animate([{ width: "100px" }, { width: "200px" }], 2000);
+@keyframes anim {
+ from {
+ width: 100px;
+ }
+ to {
+ width: 200px;
+ }
}
+</style>
+<script>
-function cancelAnimation()
+function startAnimation()
{
- player.cancel();
+ node.classList.add("anim");
}
function test()
{
InspectorTest.eventHandler["Animation.animationCreated"] = onCreated;
- InspectorTest.eventHandler["Animation.animationCanceled"] = onCanceled;
InspectorTest.eventHandler["Animation.animationStarted"] = onStarted;
InspectorTest.sendCommand("Animation.enable", {});
InspectorTest.evaluateInPage("startAnimation()", function() {});
@@ -31,12 +37,6 @@ function test()
function onStarted()
{
InspectorTest.log("Animation started");
- InspectorTest.evaluateInPage("cancelAnimation()", function() {});
- }
-
- function onCanceled()
- {
- InspectorTest.log("Animation canceled");
InspectorTest.completeTest();
}
}
@@ -44,6 +44,6 @@ function test()
</script>
</head>
<body onload="runTest()">
- <div id="node" style="background-color: red; height: 100px"></div>
+ <div id="node" style="background-color: red; width: 100px"></div>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698