@@ -1034,6 +1034,17 @@ function testGetTosUrl() {
1034
1034
[
1035
1035
'Privacy Policy URL is missing, the link will not be displayed.'
1036
1036
] , 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' ) ;
1037
1048
// Tests if callback function is passed to tosUrl config.
1038
1049
tosCallback = function ( ) { } ;
1039
1050
config . update ( 'tosUrl' , tosCallback ) ;
@@ -1062,6 +1073,17 @@ function testGetPrivacyPolicyUrl() {
1062
1073
[
1063
1074
'Term of Service URL is missing, the link will not be displayed.'
1064
1075
] , 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' ) ;
1065
1087
// Tests if callback function is passed to privacyPolicyUrl config.
1066
1088
privacyPolicyCallback = function ( ) { } ;
1067
1089
config . update ( 'privacyPolicyUrl' , privacyPolicyCallback ) ;
0 commit comments