Skip to content

Commit

Permalink
Fix usage of t.unreached_func
Browse files Browse the repository at this point in the history
  • Loading branch information
suzyh committed Aug 17, 2016
1 parent cf7144c commit 34613d3
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions web-animations/interfaces/Animation/ready.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,14 @@

async_test(function(t) {
var animation = createDiv(t).animate(null, 100 * MS_PER_SEC);
animation.ready.then(function() {
t.step(function() {
t.unreached_func('Promise should not resolve when animation cancelled');
});
}, function(e) {
t.step(function() {
assert_equals(e.code, DOMException.ABORT_ERR);
});
t.done();
});
animation.ready.then(
t.unreached_func('Promise should not resolve when animation cancelled'),
function(e) {
t.step(function() {
assert_equals(e.code, DOMException.ABORT_ERR);
});
t.done();
});
animation.cancel();
}, 'A pending ready promise should be rejected when the animation is cancelled');

Expand Down

0 comments on commit 34613d3

Please sign in to comment.