| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 | 4 |
| 5 <script> | 5 <script> |
| 6 function assert_throws_with_message(e, f, m) { | 6 function assert_throws_with_message(e, f, m) { |
| 7 try { | 7 try { |
| 8 f(); | 8 f(); |
| 9 } catch(exception) { | 9 } catch(exception) { |
| 10 assert_equals(exception.name, e); | 10 assert_equals(exception.name, e); |
| 11 assert_equals(exception.message, m); | 11 assert_equals(exception.message, m); |
| 12 } | 12 } |
| 13 } | 13 } |
| 14 | 14 |
| 15 test(function() { | 15 test(function() { |
| 16 assert_throws_with_message('InvalidModificationError', | 16 assert_throws_with_message('TypeError', |
| 17 function() { | 17 function() { |
| 18 document.documentElement.animate([ | 18 document.documentElement.animate([ |
| 19 {offset: 0.6}, | 19 {offset: 0.6}, |
| 20 {offset: 0.4} | 20 {offset: 0.4} |
| 21 ]); | 21 ]); |
| 22 }, | 22 }, |
| 23 "Failed to execute 'animate' on 'Element': Keyframes with specified offsets
are not sorted" | 23 "Failed to execute 'animate' on 'Element': Keyframes with specified offsets
are not sorted" |
| 24 ); | 24 ); |
| 25 | 25 |
| 26 assert_throws_with_message('InvalidModificationError', | 26 assert_throws_with_message('TypeError', |
| 27 function() { | 27 function() { |
| 28 document.documentElement.animate([ | 28 document.documentElement.animate([ |
| 29 {offset: 'a donkey'} | 29 {offset: 'a donkey'} |
| 30 ]); | 30 ]); |
| 31 }, | 31 }, |
| 32 "Failed to execute 'animate' on 'Element': Non numeric offset provided" | 32 "Failed to execute 'animate' on 'Element': Non numeric offset provided" |
| 33 ); | 33 ); |
| 34 | 34 |
| 35 assert_throws_with_message('InvalidModificationError', | 35 assert_throws_with_message('TypeError', |
| 36 function() { | 36 function() { |
| 37 document.documentElement.animate([ | 37 document.documentElement.animate([ |
| 38 {offset: -1} | 38 {offset: -1} |
| 39 ]); | 39 ]); |
| 40 }, | 40 }, |
| 41 "Failed to execute 'animate' on 'Element': Offsets provided outside the rang
e [0, 1]" | 41 "Failed to execute 'animate' on 'Element': Offsets provided outside the rang
e [0, 1]" |
| 42 ); | 42 ); |
| 43 }); | 43 }); |
| 44 </script> | 44 </script> |
| OLD | NEW |