@@ -1034,6 +1034,17 @@ function testGetTosUrl() {
10341034 [
10351035 'Privacy Policy URL is missing, the link will not be displayed.'
10361036 ] , warningLogMessages ) ;
1037+ // Mock that Cordova InAppBrowser plugin is installed.
1038+ stub . replace (
1039+ firebaseui . auth . util ,
1040+ 'isCordovaInAppBrowserInstalled' ,
1041+ function ( ) {
1042+ return true ;
1043+ } ) ;
1044+ tosCallback = config . getTosUrl ( ) ;
1045+ tosCallback ( ) ;
1046+ // Target should be _system if Cordova InAppBrowser plugin is installed.
1047+ testUtil . assertOpen ( 'http://localhost/tos' , '_system' ) ;
10371048 // Tests if callback function is passed to tosUrl config.
10381049 tosCallback = function ( ) { } ;
10391050 config . update ( 'tosUrl' , tosCallback ) ;
@@ -1062,6 +1073,17 @@ function testGetPrivacyPolicyUrl() {
10621073 [
10631074 'Term of Service URL is missing, the link will not be displayed.'
10641075 ] , warningLogMessages ) ;
1076+ // Mock that Cordova InAppBrowser plugin is installed.
1077+ stub . replace (
1078+ firebaseui . auth . util ,
1079+ 'isCordovaInAppBrowserInstalled' ,
1080+ function ( ) {
1081+ return true ;
1082+ } ) ;
1083+ privacyPolicyCallback = config . getPrivacyPolicyUrl ( ) ;
1084+ privacyPolicyCallback ( ) ;
1085+ // Target should be _system if Cordova InAppBrowser plugin is installed.
1086+ testUtil . assertOpen ( 'http://localhost/privacy_policy' , '_system' ) ;
10651087 // Tests if callback function is passed to privacyPolicyUrl config.
10661088 privacyPolicyCallback = function ( ) { } ;
10671089 config . update ( 'privacyPolicyUrl' , privacyPolicyCallback ) ;
0 commit comments