Skip to content

Commit

Permalink
Add test to see if generateSourceElement is called
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalk committed Apr 13, 2015
1 parent 2d89cd0 commit 9615399
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions static/script-tests/tests/devices/mediaplayer/html5commontests.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,17 @@ window.commonTests.mediaPlayer.html5.mixinTests = function (testCase, mediaPlaye
});
};

mixins.testSetSourceUsesGenerateSourceElementExtensionPoint = function(queue) {
expectAsserts(2);
var self = this;
runMediaPlayerTest(this, queue, function (MediaPlayer) {
self.sandbox.spy(self._mediaPlayer, "_generateSourceElement");
assert(self._mediaPlayer._generateSourceElement.notCalled);
self._mediaPlayer.setSource(MediaPlayer.TYPE.VIDEO, 'http://testurl/', 'video/mp4');
assert(self._mediaPlayer._generateSourceElement.calledWith('http://testurl/', 'video/mp4'));
});
};

mixins.testIfDurationAndSeekableRangeIsMissingGetSeekableRangeReturnsUndefinedAndLogsAWarning = function(queue) {
expectAsserts(2);
var self = this;
Expand Down

0 comments on commit 9615399

Please sign in to comment.