mirror of
https://github.com/videojs/video.js.git
synced 2025-03-03 15:12:49 +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:
parent
b662139708
commit
ad98bebf55
20
test/unit/controls.js
vendored
20
test/unit/controls.js
vendored
@ -1,10 +1,8 @@
|
||||
module('Controls');
|
||||
|
||||
|
||||
|
||||
test('should hide volume control if it\'s not supported', function() {
|
||||
var
|
||||
noop = function(){},
|
||||
var noop, player, volumeControl, muteToggle;
|
||||
noop = function(){};
|
||||
player = {
|
||||
id: noop,
|
||||
on: noop,
|
||||
@ -14,8 +12,8 @@ test('should hide volume control if it\'s not supported', function() {
|
||||
volumeControl: false
|
||||
}
|
||||
}
|
||||
},
|
||||
volumeControl = new vjs.VolumeControl(player),
|
||||
};
|
||||
volumeControl = new vjs.VolumeControl(player);
|
||||
muteToggle = new vjs.MuteToggle(player);
|
||||
|
||||
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(){
|
||||
var
|
||||
noop = function(){},
|
||||
listeners = [],
|
||||
var noop, listeners, player, volumeControl, muteToggle;
|
||||
noop = function(){};
|
||||
listeners = [];
|
||||
player = {
|
||||
id: noop,
|
||||
on: function(event, callback){
|
||||
@ -43,8 +41,8 @@ test('should test and toggle volume control on `loadstart`', function(){
|
||||
volumeControl: true
|
||||
}
|
||||
}
|
||||
},
|
||||
volumeControl = new vjs.VolumeControl(player),
|
||||
};
|
||||
volumeControl = new vjs.VolumeControl(player);
|
||||
muteToggle = new vjs.MuteToggle(player);
|
||||
|
||||
equal(volumeControl.el().style.display,
|
||||
|
@ -1,8 +1,8 @@
|
||||
module('HTML5');
|
||||
|
||||
test('should detect whether the volume can be changed', function(){
|
||||
var
|
||||
testVid = vjs.TEST_VID,
|
||||
var testVid, ConstVolumeVideo;
|
||||
testVid = vjs.TEST_VID;
|
||||
ConstVolumeVideo = function(){
|
||||
this.volume = 1;
|
||||
this.__defineSetter__('volume', function(){});
|
||||
|
Loading…
x
Reference in New Issue
Block a user