mirror of
https://github.com/videojs/video.js.git
synced 2025-02-12 12:16:27 +02:00
@gkatsev removed unhelpful isCrossOrigin test. closes #2715
This commit is contained in:
parent
34742e09a5
commit
93e079718e
@ -3,6 +3,7 @@ CHANGELOG
|
|||||||
|
|
||||||
## HEAD (Unreleased)
|
## HEAD (Unreleased)
|
||||||
* @typcn bumped grunt-sass to ^1.0.0 to support node 4.x ([view](https://github.com/videojs/video.js/pull/2645))
|
* @typcn bumped grunt-sass to ^1.0.0 to support node 4.x ([view](https://github.com/videojs/video.js/pull/2645))
|
||||||
|
* @gkatsev removed unhelpful isCrossOrigin test ([view](https://github.com/videojs/video.js/pull/2715))
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@ -105,8 +105,8 @@ export const getFileExtension = function(path) {
|
|||||||
* @method isCrossOrigin
|
* @method isCrossOrigin
|
||||||
*/
|
*/
|
||||||
export const isCrossOrigin = function(url) {
|
export const isCrossOrigin = function(url) {
|
||||||
let urlInfo = parseUrl(url);
|
|
||||||
let winLoc = window.location;
|
let winLoc = window.location;
|
||||||
|
let urlInfo = parseUrl(url);
|
||||||
|
|
||||||
// IE8 protocol relative urls will return ':' for protocol
|
// IE8 protocol relative urls will return ':' for protocol
|
||||||
let srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;
|
let srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;
|
||||||
|
@ -93,7 +93,6 @@ test('isCrossOrigin can identify cross origin urls', function() {
|
|||||||
win.location.protocol = 'https:';
|
win.location.protocol = 'https:';
|
||||||
win.location.host = 'google.com';
|
win.location.host = 'google.com';
|
||||||
ok(Url.isCrossOrigin('http://google.com/example.vtt'), 'http://google.com from https://google.com is cross origin');
|
ok(Url.isCrossOrigin('http://google.com/example.vtt'), 'http://google.com from https://google.com is cross origin');
|
||||||
ok(Url.isCrossOrigin('//google.com/example.vtt'), '//google.com from https://google.com is cross origin');
|
|
||||||
ok(Url.isCrossOrigin('http://example.com/example.vtt'), 'http://example.com from https://google.com is cross origin');
|
ok(Url.isCrossOrigin('http://example.com/example.vtt'), 'http://example.com from https://google.com is cross origin');
|
||||||
ok(Url.isCrossOrigin('https://example.com/example.vtt'), 'https://example.com from https://google.com is cross origin');
|
ok(Url.isCrossOrigin('https://example.com/example.vtt'), 'https://example.com from https://google.com is cross origin');
|
||||||
ok(Url.isCrossOrigin('//example.com/example.vtt'), '//example.com from https://google.com is cross origin');
|
ok(Url.isCrossOrigin('//example.com/example.vtt'), '//example.com from https://google.com is cross origin');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user