Skip to content

Commit

Permalink
update test to work on vjs5 and vjs6
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Feb 15, 2017
1 parent ad0d8d2 commit 036d5d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ QUnit.module('Video Snapshot', window.sharedModuleHooks({
}));

QUnit.test('restores the original video src after ads', function(assert) {
var originalSrc;
var originalSrc = 'http://example.com/original.mp4';

assert.expect(1);

originalSrc = this.player.tech_.src();
this.player.src(originalSrc);

this.player.trigger('adsready');
this.player.trigger('play');
this.player.ads.startLinearAdMode();
this.player.src('//example.com/ad.mp4');
this.player.ads.endLinearAdMode();
assert.strictEqual(this.player.tech_.src(), originalSrc, 'the original src is restored');
assert.strictEqual(this.player.currentSrc(), originalSrc, 'the original src is restored');
});

QUnit.test('waits for the video to become seekable before restoring the time', function(assert) {
Expand Down

0 comments on commit 036d5d7

Please sign in to comment.