@@ -298,58 +298,58 @@ TEST_F(FirebaseAnalyticsTest, TestLogEventWithComplexParameters) {
298298}
299299
300300TEST_F (FirebaseAnalyticsTest, TestSetConsent) {
301- // On Android, this test must be performed at the end, after all the tests for
302- // session ID and instance ID. This is because once you call SetConsent to
303- // deny consent on Android, calling it again to grant consent may not take
304- // effect until the app restarts, thus breaking any of those tests that are
305- // run after this one.
306- //
307- // If this test does happen to run earlier (due to randomizing test order, for
308- // example), the tests that could fail will be skipped (on Android).
309-
310- // Can't confirm that these do anything but just run them all to ensure the
311- // app doesn't crash.
312- std::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus>
313- consent_settings_allow = {
314- {firebase::analytics::kConsentTypeAnalyticsStorage ,
315- firebase::analytics::kConsentStatusGranted },
316- {firebase::analytics::kConsentTypeAdStorage ,
317- firebase::analytics::kConsentStatusGranted },
318- {firebase::analytics::kConsentTypeAdUserData ,
319- firebase::analytics::kConsentStatusGranted },
320- {firebase::analytics::kConsentTypeAdPersonalization ,
321- firebase::analytics::kConsentStatusGranted }};
322- std::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus>
323- consent_settings_deny = {
324- {firebase::analytics::kConsentTypeAnalyticsStorage ,
325- firebase::analytics::kConsentStatusDenied },
326- {firebase::analytics::kConsentTypeAdStorage ,
327- firebase::analytics::kConsentStatusDenied },
328- {firebase::analytics::kConsentTypeAdUserData ,
329- firebase::analytics::kConsentStatusDenied },
330- {firebase::analytics::kConsentTypeAdPersonalization ,
331- firebase::analytics::kConsentStatusDenied }};
332- std::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus>
333- consent_settings_empty;
334- firebase::analytics::SetConsent (consent_settings_empty);
335- ProcessEvents (1000 );
336- firebase::analytics::SetConsent (consent_settings_deny);
337- ProcessEvents (1000 );
338- firebase::analytics::SetConsent (consent_settings_allow);
339- ProcessEvents (1000 );
340-
341- did_test_setconsent_ = true ;
301+ // On Android, this test must be performed at the end, after all the tests for
302+ // session ID and instance ID. This is because once you call SetConsent to
303+ // deny consent on Android, calling it again to grant consent may not take
304+ // effect until the app restarts, thus breaking any of those tests that are
305+ // run after this one.
306+ //
307+ // If this test does happen to run earlier (due to randomizing test order, for
308+ // example), the tests that could fail will be skipped (on Android).
309+
310+ // Can't confirm that these do anything but just run them all to ensure the
311+ // app doesn't crash.
312+ std::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus>
313+ consent_settings_allow = {
314+ {firebase::analytics::kConsentTypeAnalyticsStorage ,
315+ firebase::analytics::kConsentStatusGranted },
316+ {firebase::analytics::kConsentTypeAdStorage ,
317+ firebase::analytics::kConsentStatusGranted },
318+ {firebase::analytics::kConsentTypeAdUserData ,
319+ firebase::analytics::kConsentStatusGranted },
320+ {firebase::analytics::kConsentTypeAdPersonalization ,
321+ firebase::analytics::kConsentStatusGranted }};
322+ std::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus>
323+ consent_settings_deny = {
324+ {firebase::analytics::kConsentTypeAnalyticsStorage ,
325+ firebase::analytics::kConsentStatusDenied },
326+ {firebase::analytics::kConsentTypeAdStorage ,
327+ firebase::analytics::kConsentStatusDenied },
328+ {firebase::analytics::kConsentTypeAdUserData ,
329+ firebase::analytics::kConsentStatusDenied },
330+ {firebase::analytics::kConsentTypeAdPersonalization ,
331+ firebase::analytics::kConsentStatusDenied }};
332+ std::map<firebase::analytics::ConsentType, firebase::analytics::ConsentStatus>
333+ consent_settings_empty;
334+ firebase::analytics::SetConsent (consent_settings_empty);
335+ ProcessEvents (1000 );
336+ firebase::analytics::SetConsent (consent_settings_deny);
337+ ProcessEvents (1000 );
338+ firebase::analytics::SetConsent (consent_settings_allow);
339+ ProcessEvents (1000 );
340+
341+ did_test_setconsent_ = true ;
342342}
343343
344344TEST_F (FirebaseAnalyticsTest, TestSetDefaultEventParameters) {
345- std::map<std::string, firebase::Variant> default_params = {
345+ std::map<std::string, firebase::Variant> default_params = {
346346 {" key1" , firebase::Variant (" value1" )},
347347 {" key2" , firebase::Variant (12345 )},
348348 {" key3" , firebase::Variant (1.01 )},
349349 {" key4" , firebase::Variant (" my_value" )},
350350 {" key5" , firebase::Variant (true )},
351351 {" key6" , firebase::Variant::EmptyMap ()},
352352 };
353- firebase::analytics::SetDefaultEventParameters (default_params);
353+ firebase::analytics::SetDefaultEventParameters (default_params);
354354}
355355} // namespace firebase_testapp_automated
0 commit comments