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

Unified Diff: LayoutTests/web-animations-api/transitions-replay.html

Issue 1030103002: Transitions: Downgrade transition to animation after it has finished (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/web-animations-api/transitions-replay.html
diff --git a/LayoutTests/web-animations-api/transitions-replay.html b/LayoutTests/web-animations-api/transitions-replay.html
new file mode 100644
index 0000000000000000000000000000000000000000..8849de939349cd48c976a9f57559feed7a2bc5ea
--- /dev/null
+++ b/LayoutTests/web-animations-api/transitions-replay.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<div id='element'></div>
+<style>
+ #element {
+ transition: background 100ms;
+ background: black;
+ }
+</style>
+<script>
+var t = async_test('Replaying a transition after it has finished should not trigger a new transition');
+
+t.step(function() {
+ element.offsetTop; // Force recalc
+ element.style.background = "green";
+ element.offsetTop; // Force recalc
+
+ assert_equals(document.timeline.getAnimationPlayers().length, 1);
+ var player = document.timeline.getAnimationPlayers()[0];
+ player.onfinish = function() {
+ requestAnimationFrame(function() {
+ requestAnimationFrame(function() {
+ player.startTime = document.timeline.currentTime - 10;
+ player.onfinish = t.done.bind(t);
+ });
+ });
+ }
+});
+</script>
« no previous file with comments | « no previous file | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698