8ad068fe by Gary Katsevman

Update tests and add one checks for exact match

1 parent 229bae7e
...@@ -427,7 +427,6 @@ videojs.Hls.prototype.selectPlaylist = function () { ...@@ -427,7 +427,6 @@ videojs.Hls.prototype.selectPlaylist = function () {
427 i = sortedPlaylists.length, 427 i = sortedPlaylists.length,
428 variant, 428 variant,
429 oldvariant, 429 oldvariant,
430 ret,
431 bandwidthBestVariant, 430 bandwidthBestVariant,
432 resolutionPlusOne, 431 resolutionPlusOne,
433 resolutionBestVariant; 432 resolutionBestVariant;
......
...@@ -813,8 +813,8 @@ test('selects the correct rendition by player dimensions', function() { ...@@ -813,8 +813,8 @@ test('selects the correct rendition by player dimensions', function() {
813 813
814 playlist = player.hls.selectPlaylist(); 814 playlist = player.hls.selectPlaylist();
815 815
816 deepEqual(playlist.attributes.RESOLUTION, {width:396,height:224},'should return the correct resolution by player dimensions'); 816 deepEqual(playlist.attributes.RESOLUTION, {width:960,height:540},'should return the correct resolution by player dimensions');
817 equal(playlist.attributes.BANDWIDTH, 440000, 'should have the expected bandwidth in case of multiple'); 817 equal(playlist.attributes.BANDWIDTH, 1928000, 'should have the expected bandwidth in case of multiple');
818 818
819 player.width(1920); 819 player.width(1920);
820 player.height(1080); 820 player.height(1080);
...@@ -825,6 +825,13 @@ test('selects the correct rendition by player dimensions', function() { ...@@ -825,6 +825,13 @@ test('selects the correct rendition by player dimensions', function() {
825 deepEqual(playlist.attributes.RESOLUTION, {width:960,height:540},'should return the correct resolution by player dimensions'); 825 deepEqual(playlist.attributes.RESOLUTION, {width:960,height:540},'should return the correct resolution by player dimensions');
826 equal(playlist.attributes.BANDWIDTH, 1928000, 'should have the expected bandwidth in case of multiple'); 826 equal(playlist.attributes.BANDWIDTH, 1928000, 'should have the expected bandwidth in case of multiple');
827 827
828 player.width(396);
829 player.height(224);
830 playlist = player.hls.selectPlaylist();
831
832 deepEqual(playlist.attributes.RESOLUTION, {width:396,height:224},'should return the correct resolution by player dimensions, if exact match');
833 equal(playlist.attributes.BANDWIDTH, 440000, 'should have the expected bandwidth in case of multiple, if exact match');
834
828 }); 835 });
829 836
830 837
......