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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html

Issue 2656273003: Detect/report animations that are cancelled after they start. (Closed)
Patch Set: Slight comment fix Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html
new file mode 100644
index 0000000000000000000000000000000000000000..01aba78cba8dc3cb6af908f0b79d8ab34080cb15
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel.html
@@ -0,0 +1,51 @@
+<html>
+<head>
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
+<script>
+
+function triggerEmptyTransition()
+{
+ node.style.transition = "1s";
+ node.offsetTop;
+ node.style.width = "200px";
+ node.offsetTop;
+ // Deliberately delay for two RAFs, which causes the animation to start
+ // before we cancel it by clearing the transition.
+ window.requestAnimationFrame(function() {
+ window.requestAnimationFrame(function() {
+ node.style.transition = "";
+ });
+ });
+}
+
+function test()
+{
+ InspectorTest.eventHandler["Animation.animationCreated"] = onCreated;
+ InspectorTest.eventHandler["Animation.animationStarted"] = onStarted;
+ InspectorTest.eventHandler["Animation.animationCanceled"] = onCanceled;
+ InspectorTest.sendCommand("Animation.enable", {});
+ InspectorTest.evaluateInPage("triggerEmptyTransition()", function() {});
+
+ function onCreated()
+ {
+ InspectorTest.log("Animation created");
+ }
+
+ function onStarted()
+ {
+ InspectorTest.log("Animation started");
+ }
+
+ function onCanceled()
+ {
+ InspectorTest.log("Animation canceled");
+ InspectorTest.completeTest();
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+ <div id="node" style="background-color: red; width: 100px"></div>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector-protocol/animation/animation-start-cancel-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698