1 /* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.adservices.tests.cts.measurement; 17 18 import static com.android.adservices.service.DebugFlagsConstants.KEY_CONSENT_MANAGER_DEBUG_MODE; 19 import static com.android.adservices.service.DebugFlagsConstants.KEY_CONSENT_NOTIFIED_DEBUG_MODE; 20 import static com.android.adservices.service.FlagsConstants.KEY_ADID_KILL_SWITCH; 21 import static com.android.adservices.service.FlagsConstants.KEY_ENABLE_ENROLLMENT_TEST_SEED; 22 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_API_DELETE_REGISTRATIONS_KILL_SWITCH; 23 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_API_REGISTER_SOURCE_KILL_SWITCH; 24 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_API_REGISTER_TRIGGER_KILL_SWITCH; 25 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_API_REGISTER_WEB_SOURCE_KILL_SWITCH; 26 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_API_REGISTER_WEB_TRIGGER_KILL_SWITCH; 27 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_API_STATUS_KILL_SWITCH; 28 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_ENABLE_SESSION_STABLE_KILL_SWITCHES; 29 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_KILL_SWITCH; 30 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_REGISTER_SOURCES_REQUEST_PERMITS_PER_SECOND; 31 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_REGISTER_SOURCE_REQUEST_PERMITS_PER_SECOND; 32 import static com.android.adservices.service.FlagsConstants.KEY_MEASUREMENT_REGISTER_WEB_SOURCE_REQUEST_PERMITS_PER_SECOND; 33 34 import com.android.adservices.common.AdServicesCtsTestCase; 35 import com.android.adservices.common.annotations.DisableGlobalKillSwitch; 36 import com.android.adservices.common.annotations.SetAllLogcatTags; 37 import com.android.adservices.common.annotations.SetCompatModeFlags; 38 import com.android.adservices.common.annotations.SetMsmtApiAppAllowList; 39 import com.android.adservices.common.annotations.SetMsmtWebContextClientAppAllowList; 40 import com.android.adservices.shared.testing.annotations.EnableDebugFlag; 41 import com.android.adservices.shared.testing.annotations.SetFlagDisabled; 42 import com.android.adservices.shared.testing.annotations.SetFlagEnabled; 43 import com.android.adservices.shared.testing.annotations.SetFloatFlag; 44 45 @DisableGlobalKillSwitch 46 @EnableDebugFlag(KEY_CONSENT_MANAGER_DEBUG_MODE) 47 @EnableDebugFlag(KEY_CONSENT_NOTIFIED_DEBUG_MODE) 48 @SetAllLogcatTags 49 @SetCompatModeFlags 50 @SetFlagDisabled(KEY_ADID_KILL_SWITCH) 51 @SetFlagDisabled(KEY_MEASUREMENT_API_DELETE_REGISTRATIONS_KILL_SWITCH) 52 @SetFlagDisabled(KEY_MEASUREMENT_API_REGISTER_SOURCE_KILL_SWITCH) 53 @SetFlagDisabled(KEY_MEASUREMENT_API_REGISTER_TRIGGER_KILL_SWITCH) 54 @SetFlagDisabled(KEY_MEASUREMENT_API_REGISTER_WEB_SOURCE_KILL_SWITCH) 55 @SetFlagDisabled(KEY_MEASUREMENT_API_REGISTER_WEB_TRIGGER_KILL_SWITCH) 56 @SetFlagDisabled(KEY_MEASUREMENT_API_STATUS_KILL_SWITCH) 57 @SetFlagDisabled(KEY_MEASUREMENT_ENABLE_SESSION_STABLE_KILL_SWITCHES) 58 @SetFlagDisabled(KEY_MEASUREMENT_KILL_SWITCH) 59 @SetFlagEnabled(KEY_ENABLE_ENROLLMENT_TEST_SEED) 60 @SetFloatFlag(name = KEY_MEASUREMENT_REGISTER_SOURCES_REQUEST_PERMITS_PER_SECOND, value = 25.0f) 61 @SetFloatFlag(name = KEY_MEASUREMENT_REGISTER_SOURCE_REQUEST_PERMITS_PER_SECOND, value = 25.0f) 62 @SetFloatFlag(name = KEY_MEASUREMENT_REGISTER_WEB_SOURCE_REQUEST_PERMITS_PER_SECOND, value = 25.0f) 63 @SetMsmtApiAppAllowList 64 @SetMsmtWebContextClientAppAllowList 65 abstract class CtsMeasurementEndToEndTestCase extends AdServicesCtsTestCase {} 66