@@ -921,45 +921,40 @@ function testUseEmulator() {
921
921
0 , fireauth . RpcHandler . prototype . updateEmulatorConfig . getCallCount ( ) ) ;
922
922
923
923
// Update the emulator config.
924
- auth1 . useEmulator ( 'emulator.test.domain' , 1234 ) ;
924
+ auth1 . useEmulator ( 'http:// emulator.test.domain: 1234' ) ;
925
925
assertObjectEquals (
926
926
auth1 . getEmulatorConfig ( ) , {
927
- hostname : 'emulator.test.domain' ,
928
- port : 1234
927
+ url : 'http://emulator.test.domain:1234' ,
929
928
} ) ;
930
929
// Should notify the RPC handler.
931
930
assertEquals (
932
931
1 , fireauth . RpcHandler . prototype . updateEmulatorConfig . getCallCount ( ) ) ;
933
932
assertObjectEquals ( {
934
- hostname : 'emulator.test.domain' ,
935
- port : 1234
933
+ url : 'http://emulator.test.domain:1234' ,
936
934
} ,
937
935
fireauth . RpcHandler . prototype . updateEmulatorConfig . getLastCall ( )
938
936
. getArgument ( 0 )
939
937
) ;
940
938
941
939
// Update to the same config should not trigger event again.
942
- auth1 . useEmulator ( 'emulator.test.domain' , 1234 ) ;
940
+ auth1 . useEmulator ( 'http:// emulator.test.domain: 1234' ) ;
943
941
assertObjectEquals (
944
942
auth1 . getEmulatorConfig ( ) , {
945
- hostname : 'emulator.test.domain' ,
946
- port : 1234
943
+ url : 'http://emulator.test.domain:1234' ,
947
944
} ) ;
948
945
assertEquals (
949
946
1 , fireauth . RpcHandler . prototype . updateEmulatorConfig . getCallCount ( ) ) ;
950
947
951
948
// Updating to different config should trigger event.
952
- auth1 . useEmulator ( 'emulator.other.domain' , 9876 ) ;
949
+ auth1 . useEmulator ( 'http:// emulator.other.domain: 9876' ) ;
953
950
assertObjectEquals (
954
951
auth1 . getEmulatorConfig ( ) , {
955
- hostname : 'emulator.other.domain' ,
956
- port : 9876
952
+ url : 'http://emulator.other.domain:9876'
957
953
} ) ;
958
954
assertEquals (
959
955
2 , fireauth . RpcHandler . prototype . updateEmulatorConfig . getCallCount ( ) ) ;
960
956
assertObjectEquals ( {
961
- hostname : 'emulator.other.domain' ,
962
- port : 9876
957
+ url : 'http://emulator.other.domain:9876' ,
963
958
} ,
964
959
fireauth . RpcHandler . prototype . updateEmulatorConfig . getLastCall ( )
965
960
. getArgument ( 0 )
@@ -2246,21 +2241,19 @@ function testAuth_authEventManager_withEmulator() {
2246
2241
assertEquals ( 'API_KEY' , apiKey ) ;
2247
2242
assertEquals ( appId1 , appName ) ;
2248
2243
assertObjectEquals ( emulatorConfig , {
2249
- hostname : 'emulator.host' ,
2250
- port : 1234
2244
+ url : 'http://emulator.test.domain:1234'
2251
2245
} ) ;
2252
2246
return expectedManager ;
2253
2247
} ) ;
2254
2248
asyncTestCase . waitForSignals ( 1 ) ;
2255
2249
app1 = firebase . initializeApp ( config3 , appId1 ) ;
2256
2250
auth1 = app1 . auth ( ) ;
2257
- auth1 . useEmulator ( 'emulator.host' , 1234 ) ;
2251
+ auth1 . useEmulator ( 'http:// emulator.test.domain: 1234' ) ;
2258
2252
// Test manager initialized and Auth subscribed.
2259
2253
auth1 . onIdTokenChanged ( function ( user ) {
2260
2254
var manager = fireauth . AuthEventManager . getManager (
2261
2255
config3 [ 'authDomain' ] , config3 [ 'apiKey' ] , app1 . name , {
2262
- hostname : 'emulator.host' ,
2263
- port : 1234
2256
+ url : 'http://emulator.test.domain:1234' ,
2264
2257
} ) ;
2265
2258
assertEquals ( expectedManager , manager ) ;
2266
2259
assertEquals ( 0 , expectedManager . unsubscribe . getCallCount ( ) ) ;
0 commit comments