Skip to content

Commit

Permalink
Remove pass conditions from currentTime test names
Browse files Browse the repository at this point in the history
This made it clear that the negative test was already covered.
  • Loading branch information
foolip committed Mar 5, 2014
1 parent 2950886 commit f3b2ca1
Showing 1 changed file with 4 additions and 11 deletions.
Expand Up @@ -8,30 +8,23 @@
test(function() {
var v = document.createElement('video');
assert_equals(v.currentTime, 0);
}, 'currentTime is initially zero');

// Negative test for the specified behavior prior to HTML r6580.
test(function() {
var v = document.createElement('video');
assert_equals(v.readyState, v.HAVE_NOTHING);
v.currentTime = 1;
}, 'setting currentTime when readyState is HAVE_NOTHING does not throw');
}, 'currentTime initial value');

test(function() {
var v = document.createElement('video');
v.controller = new MediaController();
assert_true(v.controller instanceof MediaController);
assert_throws('InvalidStateError', function() { v.currentTime = 1; });
assert_false(v.seeking);
}, 'setting currentTime with a media controller present throws');
}, 'setting currentTime with a media controller present');

test(function() {
var v = document.createElement('video');
assert_equals(v.readyState, v.HAVE_NOTHING);
v.currentTime = Number.MAX_VALUE;
assert_equals(v.currentTime, Number.MAX_VALUE);
assert_false(v.seeking);
}, 'setting currentTime sets the default playback start position when readyState is HAVE_NOTHING');
}, 'setting currentTime when readyState is HAVE_NOTHING');

async_test(function(t) {
var v = document.createElement('video');
Expand All @@ -43,5 +36,5 @@
assert_true(v.seeking);
t.done();
});
}, 'setting currentTime seeks when readyState is not HAVE_NOTHING');
}, 'setting currentTime when readyState is greater than HAVE_NOTHING');
</script>

0 comments on commit f3b2ca1

Please sign in to comment.