CB-7876 change test target to avoid undesired redirects
The google.com test target would do automatic redirects to geography-specific domains depending on where the client is, which leads to different behavior depending where the tester is. This causes confusion, as the test results may be different in different geographies. Use a test target that doesn't do that, so the test results are independent of geography.
This commit is contained in:
parent
50a78baf22
commit
7a816d8454
@ -167,7 +167,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
|
||||
var info_div = '<h1>InAppBrowser</h1>' +
|
||||
'<div id="info">' +
|
||||
'Make sure http://www.google.com and https://www.google.com are white listed. </br>' +
|
||||
'Make sure http://cordova.apache.org and http://google.co.uk and https://www.google.co.uk are white listed. </br>' +
|
||||
'Make sure http://www.apple.com is not in the white list.</br>' +
|
||||
'In iOS, starred <span style="vertical-align:super">*</span> tests will put the app in a state with no way to return. </br>' +
|
||||
'<h4>User-Agent: <span id="user-agent"> </span></hr>' +
|
||||
@ -193,17 +193,17 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
|
||||
var white_listed_tests = '<h1>White Listed URL</h1>' +
|
||||
'<div id="openWhiteListed"></div>' +
|
||||
'Expected result: open successfully in CordovaWebView to www.google.com' +
|
||||
'Expected result: open successfully in CordovaWebView to cordova.apache.org' +
|
||||
'<p/> <div id="openWhiteListedSelf"></div>' +
|
||||
'Expected result: open successfully in CordovaWebView to www.google.com' +
|
||||
'Expected result: open successfully in CordovaWebView to cordova.apache.org' +
|
||||
'<p/> <div id="openWhiteListedSystem"></div>' +
|
||||
'Expected result: open successfully in system browser to www.google.com' +
|
||||
'Expected result: open successfully in system browser to cordova.apache.org' +
|
||||
'<p/> <div id="openWhiteListedBlank"></div>' +
|
||||
'Expected result: open successfully in InAppBrowser to www.google.com' +
|
||||
'Expected result: open successfully in InAppBrowser to cordova.apache.org' +
|
||||
'<p/> <div id="openWhiteListedRandom"></div>' +
|
||||
'Expected result: open successfully in InAppBrowser to www.google.com' +
|
||||
'Expected result: open successfully in InAppBrowser to cordova.apache.org' +
|
||||
'<p/> <div id="openWhiteListedRandomNoLocation"></div>' +
|
||||
'Expected result: open successfully in InAppBrowser to www.google.com with no location bar.';
|
||||
'Expected result: open successfully in InAppBrowser to cordova.apache.org with no location bar.';
|
||||
|
||||
var non_white_listed_tests = '<h1>Non White Listed URL</h1>' +
|
||||
'<div id="openNonWhiteListed"></div>' +
|
||||
@ -221,7 +221,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
|
||||
var page_with_redirects_tests = '<h1>Page with redirect</h1>' +
|
||||
'<div id="openRedirect301"></div>' +
|
||||
'Expected result: should 301 and open successfully in InAppBrowser to www.google.com.' +
|
||||
'Expected result: should 301 and open successfully in InAppBrowser to https://www.google.co.uk.' +
|
||||
'<p/> <div id="openRedirect302"></div>' +
|
||||
'Expected result: should 302 and open successfully in InAppBrowser to www.zhihu.com/answer/16714076.';
|
||||
|
||||
@ -263,11 +263,11 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
'<div id="openHidden"></div>' +
|
||||
'Expected result: no additional browser window. Alert appears with the text "background window loaded".' +
|
||||
'<p/> <div id="showHidden"></div>' +
|
||||
'Expected result: after first clicking on previous test "create hidden", open successfully in InAppBrowser to google.com.' +
|
||||
'Expected result: after first clicking on previous test "create hidden", open successfully in InAppBrowser to https://www.google.co.uk.' +
|
||||
'<p/> <div id="closeHidden"></div>' +
|
||||
'Expected result: no output. But click on "show hidden" again and nothing should be shown.' +
|
||||
'<p/> <div id="openHiddenShow"></div>' +
|
||||
'Expected result: open successfully in InAppBrowser to www.google.com';
|
||||
'Expected result: open successfully in InAppBrowser to https://www.google.co.uk';
|
||||
|
||||
var clearing_cache_tests = '<h1>Clearing Cache</h1>' +
|
||||
'<div id="openClearCache"></div>' +
|
||||
@ -336,22 +336,22 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
|
||||
//White Listed
|
||||
createActionButton('* target=Default', function () {
|
||||
doOpen('https://www.google.com');
|
||||
doOpen('http://cordova.apache.org');
|
||||
}, 'openWhiteListed');
|
||||
createActionButton('* target=_self', function () {
|
||||
doOpen('https://www.google.com', '_self');
|
||||
doOpen('http://cordova.apache.org', '_self');
|
||||
}, 'openWhiteListedSelf');
|
||||
createActionButton('target=_system', function () {
|
||||
doOpen('https://www.google.com', '_system');
|
||||
doOpen('http://cordova.apache.org', '_system');
|
||||
}, 'openWhiteListedSystem');
|
||||
createActionButton('target=_blank', function () {
|
||||
doOpen('https://www.google.com', '_blank');
|
||||
doOpen('http://cordova.apache.org', '_blank');
|
||||
}, 'openWhiteListedBlank');
|
||||
createActionButton('target=Random', function () {
|
||||
doOpen('https://www.google.com', 'random_string');
|
||||
doOpen('http://cordova.apache.org', 'random_string');
|
||||
}, 'openWhiteListedRandom');
|
||||
createActionButton('* target=Random, no location bar', function () {
|
||||
doOpen('https://www.google.com', 'random_string', 'location=no');
|
||||
doOpen('http://cordova.apache.org', 'random_string', 'location=no');
|
||||
}, 'openWhiteListedRandomNoLocation');
|
||||
|
||||
//Non White Listed
|
||||
@ -375,8 +375,8 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
}, 'openNonWhiteListedRandomNoLocation');
|
||||
|
||||
//Page with redirect
|
||||
createActionButton('http://google.com', function () {
|
||||
doOpen('http://google.com', 'random_string', '', 1);
|
||||
createActionButton('http://google.co.uk', function () {
|
||||
doOpen('http://google.co.uk', 'random_string', '', 1);
|
||||
}, 'openRedirect301');
|
||||
createActionButton('http://goo.gl/pUFqg', function () {
|
||||
doOpen('http://goo.gl/pUFqg', 'random_string', '', 2);
|
||||
@ -432,7 +432,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
|
||||
//Open hidden
|
||||
createActionButton('Create Hidden', function () {
|
||||
openHidden('https://www.google.com', true);
|
||||
openHidden('https://www.google.co.uk', true);
|
||||
}, 'openHidden');
|
||||
createActionButton('Show Hidden', function () {
|
||||
showHidden();
|
||||
@ -440,16 +440,16 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
createActionButton('Close Hidden', function () {
|
||||
closeHidden();
|
||||
}, 'closeHidden');
|
||||
createActionButton('google.com Not Hidden', function () {
|
||||
openHidden('https://www.google.com', false);
|
||||
createActionButton('google.co.uk Not Hidden', function () {
|
||||
openHidden('https://www.google.co.uk', false);
|
||||
}, 'openHiddenShow');
|
||||
|
||||
//Clearing cache
|
||||
createActionButton('Clear Browser Cache', function () {
|
||||
doOpen('https://www.google.com', '_blank', 'clearcache=yes');
|
||||
doOpen('https://www.google.co.uk', '_blank', 'clearcache=yes');
|
||||
}, 'openClearCache');
|
||||
createActionButton('Clear Session Cache', function () {
|
||||
doOpen('https://www.google.com', '_blank', 'clearsessioncache=yes');
|
||||
doOpen('https://www.google.co.uk', '_blank', 'clearsessioncache=yes');
|
||||
}, 'openClearSessionCache');
|
||||
|
||||
//Video tag
|
||||
|
Loading…
Reference in New Issue
Block a user