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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/infinite-end-time.html

Issue 1716673002: Web Animations: Throw exceptions for play/pause/reverse/finish with infinite end time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/Animation.h » ('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 <body>
5 <script>
6 function infiniteAnimation() {
7 var anim = document.body.animate([],
8 {duration: 1000, iterations: Infinity});
9 anim.cancel();
10 return anim;
11 }
12
13 test(function() {
14 var anim = infiniteAnimation();
15 try {
16 anim.finish();
17 assert_unreached();
18 } catch (e) {
19 assert_equals(e.code, DOMException.INVALID_STATE_ERR);
20 }
21 }, "finishing an infinite animation");
22
23 test(function() {
24 var anim = infiniteAnimation();
25 anim.playbackRate = -1;
26 try {
27 anim.pause();
28 assert_unreached();
29 } catch (e) {
30 assert_equals(e.code, DOMException.INVALID_STATE_ERR);
31 }
32 }, "pausing a reversed infinite animation");
33
34 test(function() {
35 var anim = infiniteAnimation();
36 anim.playbackRate = -1;
37 try {
38 anim.play();
39 assert_unreached();
40 } catch (e) {
41 assert_equals(e.code, DOMException.INVALID_STATE_ERR);
42 }
43 }, "playing a reversed infinite animation");
44
45 test(function() {
46 var anim = infiniteAnimation();
47 try {
48 anim.reverse();
49 assert_unreached();
50 } catch (e) {
51 assert_equals(e.code, DOMException.INVALID_STATE_ERR);
52 }
53 }, "reversing an infinite animation");
54 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/Animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698