Skip to content

Commit

Permalink
chore: use https urls in tests and README
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Aug 25, 2023
1 parent 8ee1d38 commit d54b8ba
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can show helpful articles, videos, and web resources inside of your app. Use
This plugin provides a web browser view that displays when calling `cordova.InAppBrowser.open()`.

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');

### `window.open`

Expand Down Expand Up @@ -166,7 +166,7 @@ instance, or the system browser.

### Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');
var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes');

### OSX Quirks
Expand Down Expand Up @@ -353,7 +353,7 @@ function messageCallBack(params){

### Quick Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function(event) { alert(event.url); });

## InAppBrowser.removeEventListener
Expand Down Expand Up @@ -384,7 +384,7 @@ The function is passed an `InAppBrowserEvent` object.

### Quick Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');
var myCallback = function(event) { alert(event.url); }
ref.addEventListener('loadstart', myCallback);
ref.removeEventListener('loadstart', myCallback);
Expand All @@ -406,7 +406,7 @@ The function is passed an `InAppBrowserEvent` object.

### Quick Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');
ref.close();

## InAppBrowser.show
Expand All @@ -426,7 +426,7 @@ The function is passed an `InAppBrowserEvent` object.

### Quick Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'hidden=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'hidden=yes');
// some time later...
ref.show();

Expand All @@ -446,7 +446,7 @@ The function is passed an `InAppBrowserEvent` object.

### Quick Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank');
// some time later...
ref.hide();

Expand Down Expand Up @@ -478,7 +478,7 @@ The function is passed an `InAppBrowserEvent` object.

### Quick Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
ref.executeScript({file: "myscript.js"});
});
Expand Down Expand Up @@ -513,7 +513,7 @@ Due to [MSDN docs](https://msdn.microsoft.com/en-us/library/windows.ui.xaml.cont

### Quick Example

var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstop', function() {
ref.insertCSS({file: "mystyles.css"});
});
Expand Down Expand Up @@ -695,13 +695,13 @@ iab.open('local-url.html', 'random_string', 'location=no'); // loads in the InAp
```
var iab = cordova.InAppBrowser;
iab.open('http://whitelisted-url.com'); // loads in the Cordova WebView
iab.open('http://whitelisted-url.com', '_self'); // loads in the Cordova WebView
iab.open('http://whitelisted-url.com', '_system'); // loads in the system browser
iab.open('http://whitelisted-url.com', '_blank'); // loads in the InAppBrowser
iab.open('http://whitelisted-url.com', 'random_string'); // loads in the InAppBrowser
iab.open('https://whitelisted-url.com'); // loads in the Cordova WebView
iab.open('https://whitelisted-url.com', '_self'); // loads in the Cordova WebView
iab.open('https://whitelisted-url.com', '_system'); // loads in the system browser
iab.open('https://whitelisted-url.com', '_blank'); // loads in the InAppBrowser
iab.open('https://whitelisted-url.com', 'random_string'); // loads in the InAppBrowser
iab.open('http://whitelisted-url.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar
iab.open('https://whitelisted-url.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar
```

Expand All @@ -710,11 +710,11 @@ iab.open('http://whitelisted-url.com', 'random_string', 'location=no'); // loads
```
var iab = cordova.InAppBrowser;
iab.open('http://url-that-fails-whitelist.com'); // loads in the InAppBrowser
iab.open('http://url-that-fails-whitelist.com', '_self'); // loads in the InAppBrowser
iab.open('http://url-that-fails-whitelist.com', '_system'); // loads in the system browser
iab.open('http://url-that-fails-whitelist.com', '_blank'); // loads in the InAppBrowser
iab.open('http://url-that-fails-whitelist.com', 'random_string'); // loads in the InAppBrowser
iab.open('http://url-that-fails-whitelist.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar
iab.open('https://url-that-fails-whitelist.com'); // loads in the InAppBrowser
iab.open('https://url-that-fails-whitelist.com', '_self'); // loads in the InAppBrowser
iab.open('https://url-that-fails-whitelist.com', '_system'); // loads in the system browser
iab.open('https://url-that-fails-whitelist.com', '_blank'); // loads in the InAppBrowser
iab.open('https://url-that-fails-whitelist.com', 'random_string'); // loads in the InAppBrowser
iab.open('https://url-that-fails-whitelist.com', 'random_string', 'location=no'); // loads in the InAppBrowser, no location bar
```
42 changes: 21 additions & 21 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,49 +657,49 @@ exports.defineManualTests = function (contentEl, createActionButton) {
createActionButton(
'* target=Default',
function () {
doOpen('http://cordova.apache.org');
doopen('https://cordova.apache.org');

Check failure on line 660 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 660 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openWhiteListed'
);
createActionButton(
'* target=Default (window.open)',
function () {
doHookOpen('http://cordova.apache.org');
doHookopen('https://cordova.apache.org');

Check failure on line 667 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doHookopen' is not defined

Check failure on line 667 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doHookopen' is not defined
},
'openWhiteListedHook'
);
createActionButton(
'* target=_self',
function () {
doOpen('http://cordova.apache.org', '_self');
doopen('https://cordova.apache.org', '_self');

Check failure on line 674 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 674 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openWhiteListedSelf'
);
createActionButton(
'target=_system',
function () {
doOpen('http://cordova.apache.org', '_system');
doopen('https://cordova.apache.org', '_system');

Check failure on line 681 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 681 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openWhiteListedSystem'
);
createActionButton(
'target=_blank',
function () {
doOpen('http://cordova.apache.org', '_blank');
doopen('https://cordova.apache.org', '_blank');

Check failure on line 688 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 688 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openWhiteListedBlank'
);
createActionButton(
'target=Random',
function () {
doOpen('http://cordova.apache.org', 'random_string');
doopen('https://cordova.apache.org', 'random_string');

Check failure on line 695 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 695 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openWhiteListedRandom'
);
createActionButton(
'* target=Random, no location bar',
function () {
doOpen('http://cordova.apache.org', 'random_string', 'location=no');
doopen('https://cordova.apache.org', 'random_string', 'location=no');

Check failure on line 702 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 702 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openWhiteListedRandomNoLocation'
);
Expand All @@ -708,49 +708,49 @@ exports.defineManualTests = function (contentEl, createActionButton) {
createActionButton(
'target=Default',
function () {
doOpen('http://www.apple.com');
doopen('https://www.apple.com');

Check failure on line 711 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 711 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openNonWhiteListed'
);
createActionButton(
'target=Default (window.open)',
function () {
doHookOpen('http://www.apple.com');
doHookopen('https://www.apple.com');

Check failure on line 718 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doHookopen' is not defined

Check failure on line 718 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doHookopen' is not defined
},
'openNonWhiteListedHook'
);
createActionButton(
'target=_self',
function () {
doOpen('http://www.apple.com', '_self');
doopen('https://www.apple.com', '_self');

Check failure on line 725 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined

Check failure on line 725 in tests/tests.js

View workflow job for this annotation

GitHub Actions / Lint Test

'doopen' is not defined
},
'openNonWhiteListedSelf'
);
createActionButton(
'target=_system',
function () {
doOpen('http://www.apple.com', '_system');
doopen('https://www.apple.com', '_system');
},
'openNonWhiteListedSystem'
);
createActionButton(
'target=_blank',
function () {
doOpen('http://www.apple.com', '_blank');
doopen('https://www.apple.com', '_blank');
},
'openNonWhiteListedBlank'
);
createActionButton(
'target=Random',
function () {
doOpen('http://www.apple.com', 'random_string');
doopen('https://www.apple.com', 'random_string');
},
'openNonWhiteListedRandom'
);
createActionButton(
'* target=Random, no location bar',
function () {
doOpen('http://www.apple.com', 'random_string', 'location=no');
doopen('https://www.apple.com', 'random_string', 'location=no');
},
'openNonWhiteListedRandomNoLocation'
);
Expand All @@ -759,14 +759,14 @@ exports.defineManualTests = function (contentEl, createActionButton) {
createActionButton(
'http://google.co.uk',
function () {
doOpen('http://google.co.uk', 'random_string', '', 1);
doopen('https://google.co.uk', 'random_string', '', 1);
},
'openRedirect301'
);
createActionButton(
'http://goo.gl/pUFqg',
function () {
doOpen('http://goo.gl/pUFqg', 'random_string', '', 2);
doopen('https://goo.gl/pUFqg', 'random_string', '', 2);
},
'openRedirect302'
);
Expand All @@ -775,7 +775,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
createActionButton(
'Remote URL',
function () {
doOpen('http://www.stluciadance.com/prospectus_file/sample.pdf');
doopen('https://www.stluciadance.com/prospectus_file/sample.pdf');
},
'openPDF'
);
Expand All @@ -798,7 +798,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
createActionButton(
'Invalid Host',
function () {
doOpen('http://www.inv;alid.com/', '_blank');
doopen('https://www.inv;alid.com/', '_blank');
},
'openInvalidHost'
);
Expand Down Expand Up @@ -974,21 +974,21 @@ exports.defineManualTests = function (contentEl, createActionButton) {
createActionButton(
'no hardwareback (defaults to yes)',
function () {
doOpen('http://cordova.apache.org', '_blank');
doopen('https://cordova.apache.org', '_blank');
},
'openHardwareBackDefault'
);
createActionButton(
'hardwareback=yes',
function () {
doOpen('http://cordova.apache.org', '_blank', 'hardwareback=yes');
doopen('https://cordova.apache.org', '_blank', 'hardwareback=yes');
},
'openHardwareBackYes'
);
createActionButton(
'hardwareback=no',
function () {
doOpen('http://cordova.apache.org', '_blank', 'hardwareback=no');
doopen('https://cordova.apache.org', '_blank', 'hardwareback=no');
},
'openHardwareBackNo'
);
Expand Down

0 comments on commit d54b8ba

Please sign in to comment.