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

Unified Diff: LayoutTests/web-animations-api/timeline-time.html

Issue 215043007: Web Animations: Expose timeline currentTime in IDL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: isNull not isNullTime Created 6 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/DocumentTimeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/web-animations-api/timeline-time.html
diff --git a/LayoutTests/web-animations-api/timeline-play-animation.html b/LayoutTests/web-animations-api/timeline-time.html
similarity index 50%
copy from LayoutTests/web-animations-api/timeline-play-animation.html
copy to LayoutTests/web-animations-api/timeline-time.html
index 0e6f993e1c67468519446846c54b0955ddaaf153..359e22662fd636f74fc37d8e8e7173f7386501d4 100644
--- a/LayoutTests/web-animations-api/timeline-play-animation.html
+++ b/LayoutTests/web-animations-api/timeline-time.html
@@ -3,12 +3,11 @@
<script src="../resources/testharnessreport.js"></script>
<body>
- <div id='e'></div>
+ <div id='element'></div>
</body>
<script>
-var element = document.getElementById('e');
-var style = getComputedStyle(element);
+var element = document.getElementById('element');
var duration = 1;
var animation = new Animation(element,
@@ -17,9 +16,11 @@ var animation = new Animation(element,
duration);
test(function() {
+ var startTime = document.timeline.currentTime;
var player = document.timeline.play(animation);
- player.pause();
- player.currentTime = duration / 2;
- assert_equals(style.opacity, '0.5');
-}, 'Calling document.timeline.play() should start an animation.');
+ player.finish();
+ var finishTime = document.timeline.currentTime;
+ assert_greater_than_equal(startTime, 0);
+ assert_equals(startTime, finishTime);
+}, 'document.timeline.currentTime should not change within a script block.');
</script>
« no previous file with comments | « no previous file | Source/core/animation/DocumentTimeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698