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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/player.html

Issue 2139163002: Animations: Remove player.html test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/player-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <div id='element'></div>
6
7 <script>
8 var element = document.getElementById('element');
9 test(function() {
10 var player = element.animate([{left: '0px', offset: 0}, {left: '100px', offs et: 1}], 10000);
11 var animation = player.source;
12 assert_equals(animation.player, player);
13 assert_equals(player.currentTime, 0);
14 player.currentTime = 5000;
15 assert_equals(player.currentTime, 5000);
16 assert_equals(player.timeLag, -5000);
17
18 player.startTime += 1000;
19
20 assert_equals(player.currentTime, 4000);
21
22 player.pause();
23 assert_true(player.paused);
24 player.play();
25 assert_false(player.paused);
26
27 player.finish();
28 assert_equals(player.currentTime, 10000);
29 assert_true(player.finished);
30
31 player.reverse();
32 assert_equals(player.playbackRate, -1);
33
34 player.playbackRate = -2;
35 assert_equals(player.playbackRate, -2);
36
37 player.cancel();
38 assert_equals(animation.player, null);
39 }, 'Player sanity tests');
40
41 test(function() {
42 var player = element.animate([{left: '0px', offset: 0}, {left: '100px', offs et: 1}], {iterations: Infinity, duration: 10});
43 assert_throws('INVALID_STATE_ERR', function() { player.finish(); });
44 }, 'Player.finish() raises exception if source content end is infinity');
45
46 test(function() {
47 var player = element.animate([{left: '0px', offset: 0}, {left: '100px', offs et: 1}], 10000);
48 for (var attr of ['startTime', 'currentTime', 'playbackRate']) {
49 assert_throws(new TypeError, function() { player[attr] = NaN; }, attr);
50 assert_throws(new TypeError, function() { player[attr] = Infinity; }, at tr);
51 }
52 }, 'Player.startTime/currentTime/playbackRate throw if passed non-finite numbers .');
53 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/web-animations-api/player-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698