|
22 | 22 | @import FirebaseAuth;
|
23 | 23 | @import FirebaseCore;
|
24 | 24 |
|
25 |
| -/** @var kExpectationTimeout |
26 |
| - @brief The maximum time waiting for expectations to fulfill. |
27 |
| - */ |
28 |
| -static const NSTimeInterval kExpectationTimeout = 1; |
29 |
| - |
30 | 25 | /** @var kFakeAuthorizedDomain
|
31 | 26 | @brief A fake authorized domain for the app.
|
32 | 27 | */
|
@@ -162,32 +157,6 @@ - (void)testObtainingOAuthCredentialWithIDToken {
|
162 | 157 | XCTAssertEqualObjects(OAuthCredential.IDToken, kFakeIDToken);
|
163 | 158 | }
|
164 | 159 |
|
165 |
| -/** @fn testGetCredentialWithUIDelegateWithClientIDOnMainThread |
166 |
| - @brief Verifies @c getCredentialWithUIDelegate:completion: calls its completion handler on the |
167 |
| - main thread. Regression test for firebase/FirebaseUI-iOS#1199. |
168 |
| - */ |
169 |
| -- (void)testGetCredentialWithUIDelegateWithClientIDOnMainThread { |
170 |
| - XCTestExpectation *expectation = [self expectationWithDescription:@"callback"]; |
171 |
| - |
172 |
| - FIROptions *options = |
173 |
| - [[FIROptions alloc] initWithGoogleAppID:@"0:0000000000000:ios:0000000000000000" |
174 |
| - GCMSenderID:@"00000000000000000-00000000000-000000000"]; |
175 |
| - options.APIKey = kFakeAPIKey; |
176 |
| - options.projectID = @"myProjectID"; |
177 |
| - options.clientID = kFakeClientID; |
178 |
| - [FIRApp configureWithName:@"objAppName" options:options]; |
179 |
| - FIRAuth *auth = [FIRAuth authWithApp:[FIRApp appNamed:@"objAppName"]]; |
180 |
| - [auth setMainBundleUrlTypes:@[ @{@"CFBundleURLSchemes" : @[ kFakeReverseClientID ]} ]]; |
181 |
| - |
182 |
| - FIROAuthProvider *provider = [FIROAuthProvider providerWithProviderID:kFakeProviderID auth:auth]; |
183 |
| - [provider getCredentialWithUIDelegate:nil |
184 |
| - completion:^(FIRAuthCredential *_Nullable credential, |
185 |
| - NSError *_Nullable error) { |
186 |
| - XCTAssertTrue([NSThread isMainThread]); |
187 |
| - [expectation fulfill]; |
188 |
| - }]; |
189 |
| - [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; |
190 |
| -} |
191 | 160 | @end
|
192 | 161 |
|
193 | 162 | #endif // TARGET_OS_IOS
|
0 commit comments