Skip to content

Commit 924981b

Browse files
committed
Fix non-UI tests.
1 parent 21fa4cd commit 924981b

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

gma/integration_test/src/integration_test.cc

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,6 @@ void FirebaseGmaPreInitializationTests::SetUpTestSuite() {
356356

357357
// Test cases below.
358358

359-
#if 0 // jsimantov
360-
361359
TEST_F(FirebaseGmaMinimalTest, TestInitializeGmaWithoutFirebase) {
362360
// Don't initialize mediation in this test so that a later test can still
363361
// verify that mediation has not been initialized.
@@ -2477,8 +2475,6 @@ TEST_F(FirebaseGmaTest, TestAdViewMultithreadDeletion) {
24772475
#endif // #if defined(ANDROID) || (defined(TARGET_OS_IPHONE) &&
24782476
// TARGET_OS_IPHONE)
24792477

2480-
#endif // 0 // jsimantov
2481-
24822478
class FirebaseGmaUmpTest : public FirebaseGmaTest {
24832479
public:
24842480
FirebaseGmaUmpTest() : consent_info_(nullptr) {}
@@ -2962,7 +2958,8 @@ TEST_F(FirebaseGmaUmpTest, TestUmpMethodsReturnOperationInProgress) {
29622958
ConsentRequestParameters params;
29632959
params.tag_for_under_age_of_consent = false;
29642960
params.debug_settings.debug_geography =
2965-
firebase::gma::ump::kConsentDebugGeographyEEA;
2961+
ShouldRunUITests() ? firebase::gma::ump::kConsentDebugGeographyEEA
2962+
: firebase::gma::ump::kConsentDebugGeographyNonEEA;
29662963
params.debug_settings.debug_device_ids = kTestDeviceIDs;
29672964
params.debug_settings.debug_device_ids.push_back(GetDebugDeviceId());
29682965

@@ -2977,17 +2974,17 @@ TEST_F(FirebaseGmaUmpTest, TestUmpMethodsReturnOperationInProgress) {
29772974
WaitForCompletion(future_request_1, "RequestConsentInfoUpdate first");
29782975
FLAKY_TEST_SECTION_END();
29792976

2980-
FLAKY_TEST_SECTION_BEGIN();
2981-
firebase::Future<void> future_load_1 = consent_info_->LoadConsentForm();
2982-
firebase::Future<void> future_load_2 = consent_info_->LoadConsentForm();
2983-
WaitForCompletion(future_load_2, "LoadConsentForm second",
2984-
firebase::gma::ump::kConsentFormErrorOperationInProgress);
2985-
WaitForCompletion(future_load_1, "LoadConsentForm first");
2986-
FLAKY_TEST_SECTION_END();
2987-
29882977
if (ShouldRunUITests()) {
29892978
// The below should only be checked if UI tests are enabled, as they
29902979
// require some interaction.
2980+
FLAKY_TEST_SECTION_BEGIN();
2981+
firebase::Future<void> future_load_1 = consent_info_->LoadConsentForm();
2982+
firebase::Future<void> future_load_2 = consent_info_->LoadConsentForm();
2983+
WaitForCompletion(future_load_2, "LoadConsentForm second",
2984+
firebase::gma::ump::kConsentFormErrorOperationInProgress);
2985+
WaitForCompletion(future_load_1, "LoadConsentForm first");
2986+
FLAKY_TEST_SECTION_END();
2987+
29912988
FLAKY_TEST_SECTION_BEGIN();
29922989
firebase::Future<void> future_show_1 =
29932990
consent_info_->ShowConsentForm(app_framework::GetWindowController());

0 commit comments

Comments
 (0)