1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-27 02:43:45 +02:00

Merge pull request #1435 from dmlap/test-manual-tracking

Add test for manual time tracking and dispose
This commit is contained in:
Steve Heffernan 2014-08-27 13:26:48 -07:00
commit 537ae2b805

View File

@ -115,3 +115,21 @@ test('should synthesize progress events by default', function() {
clock.tick(500); clock.tick(500);
equal(progresses, 1, 'triggered one event'); equal(progresses, 1, 'triggered one event');
}); });
test('dispose() should stop time tracking', function() {
var tech = new videojs.MediaTechController({
id: noop,
on: noop,
trigger: noop
});
tech.dispose();
// progress and timeupdate events will throw exceptions after the
// tech is disposed
try {
clock.tick(10 * 1000);
} catch (e) {
return equal(e, undefined, 'threw an exception');
}
ok(true, 'no exception was thrown');
});