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

Unified Diff: LayoutTests/web-animations-api/player-source-becomes-longer.html

Issue 961993003: Web Animations: Fix Player's timing update when source content becomes longer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test Created 5 years, 10 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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/web-animations-api/player-source-becomes-longer.html
diff --git a/LayoutTests/web-animations-api/player-source-becomes-longer.html b/LayoutTests/web-animations-api/player-source-becomes-longer.html
new file mode 100644
index 0000000000000000000000000000000000000000..04d9f6aa39b0f3ee6e47616224cd1298167319c7
--- /dev/null
+++ b/LayoutTests/web-animations-api/player-source-becomes-longer.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<script>
+test(function() {
+ document.timeline.playbackRate = 0;
+ document.timeline.currentTime = 0;
+ var player = document.documentElement.animate([], 1000);
+ player.startTime = -1000;
+
+ assert_equals(player.currentTime, 1000);
+
+ player.source.timing.duration = 1500;
+ document.timeline.currentTime = 2000;
+
+ assert_equals(player.startTime, -1000);
+ assert_equals(player.currentTime, 1500);
+}, 'Extending source content should not cause a change in start time.');
+</script>
« no previous file with comments | « no previous file | Source/core/animation/AnimationPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698