Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / web-animations-api / keyframe-exceptions.html
blob8053465b5f3c02e0e2fac3a11156ae9923d0cc7d
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
5 <script>
6 function assert_throws_with_message(e, f, m) {
7 try {
8 f();
9 } catch(exception) {
10 assert_equals(exception.name, e);
11 assert_equals(exception.message, m);
15 test(function() {
16 assert_throws_with_message('InvalidModificationError',
17 function() {
18 document.documentElement.animate([
19 {offset: 0.6},
20 {offset: 0.4}
21 ]);
23 "Failed to execute 'animate' on 'Element': Keyframes with specified offsets are not sorted"
26 assert_throws_with_message('InvalidModificationError',
27 function() {
28 document.documentElement.animate([
29 {offset: 'a donkey'}
30 ]);
32 "Failed to execute 'animate' on 'Element': Non numeric offset provided"
35 assert_throws_with_message('InvalidModificationError',
36 function() {
37 document.documentElement.animate([
38 {offset: -1}
39 ]);
41 "Failed to execute 'animate' on 'Element': Offsets provided outside the range [0, 1]"
43 });
44 </script>