mirror of
https://github.com/videojs/video.js.git
synced 2025-07-15 01:34:23 +02:00
Reformat var
statements
Declare them in a single line at the top of the function and initialize them later.
This commit is contained in:
20
test/unit/controls.js
vendored
20
test/unit/controls.js
vendored
@ -1,10 +1,8 @@
|
|||||||
module('Controls');
|
module('Controls');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test('should hide volume control if it\'s not supported', function() {
|
test('should hide volume control if it\'s not supported', function() {
|
||||||
var
|
var noop, player, volumeControl, muteToggle;
|
||||||
noop = function(){},
|
noop = function(){};
|
||||||
player = {
|
player = {
|
||||||
id: noop,
|
id: noop,
|
||||||
on: noop,
|
on: noop,
|
||||||
@ -14,8 +12,8 @@ test('should hide volume control if it\'s not supported', function() {
|
|||||||
volumeControl: false
|
volumeControl: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
volumeControl = new vjs.VolumeControl(player),
|
volumeControl = new vjs.VolumeControl(player);
|
||||||
muteToggle = new vjs.MuteToggle(player);
|
muteToggle = new vjs.MuteToggle(player);
|
||||||
|
|
||||||
equal(volumeControl.el().style.display, 'none', 'volumeControl is not hidden');
|
equal(volumeControl.el().style.display, 'none', 'volumeControl is not hidden');
|
||||||
@ -23,9 +21,9 @@ test('should hide volume control if it\'s not supported', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should test and toggle volume control on `loadstart`', function(){
|
test('should test and toggle volume control on `loadstart`', function(){
|
||||||
var
|
var noop, listeners, player, volumeControl, muteToggle;
|
||||||
noop = function(){},
|
noop = function(){};
|
||||||
listeners = [],
|
listeners = [];
|
||||||
player = {
|
player = {
|
||||||
id: noop,
|
id: noop,
|
||||||
on: function(event, callback){
|
on: function(event, callback){
|
||||||
@ -43,8 +41,8 @@ test('should test and toggle volume control on `loadstart`', function(){
|
|||||||
volumeControl: true
|
volumeControl: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
volumeControl = new vjs.VolumeControl(player),
|
volumeControl = new vjs.VolumeControl(player);
|
||||||
muteToggle = new vjs.MuteToggle(player);
|
muteToggle = new vjs.MuteToggle(player);
|
||||||
|
|
||||||
equal(volumeControl.el().style.display,
|
equal(volumeControl.el().style.display,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
module('HTML5');
|
module('HTML5');
|
||||||
|
|
||||||
test('should detect whether the volume can be changed', function(){
|
test('should detect whether the volume can be changed', function(){
|
||||||
var
|
var testVid, ConstVolumeVideo;
|
||||||
testVid = vjs.TEST_VID,
|
testVid = vjs.TEST_VID;
|
||||||
ConstVolumeVideo = function(){
|
ConstVolumeVideo = function(){
|
||||||
this.volume = 1;
|
this.volume = 1;
|
||||||
this.__defineSetter__('volume', function(){});
|
this.__defineSetter__('volume', function(){});
|
||||||
|
Reference in New Issue
Block a user