/packages/modules/AdServices/adservices/apk/unittest/src/com/android/adservices/customaudience/ |
D | CustomAudienceServiceTest.java | 62 @Mock private ConsentManager mConsentManagerMock; field in CustomAudienceServiceTest 76 verify(mConsentManagerMock, never()).getConsent(); in testBindableCustomAudienceServiceKillSwitchOnGaUxEnabled() 77 verify(mConsentManagerMock, never()).getConsent(any()); in testBindableCustomAudienceServiceKillSwitchOnGaUxEnabled() 89 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testBindableCustomAudienceServiceKillSwitchOffGaUxEnabled() 91 .when(mConsentManagerMock) in testBindableCustomAudienceServiceKillSwitchOffGaUxEnabled() 107 verify(mConsentManagerMock, never()).getConsent(); in testBindableCustomAudienceServiceKillSwitchOffGaUxEnabled() 108 verify(mConsentManagerMock).getConsent(eq(AdServicesApiType.FLEDGE)); in testBindableCustomAudienceServiceKillSwitchOffGaUxEnabled()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | FledgeConsentFilterTest.java | 46 @Mock private ConsentManager mConsentManagerMock; field in FledgeConsentFilterTest 53 mFledgeConsentFilter = new FledgeConsentFilter(mConsentManagerMock, mAdServicesLoggerMock); in setup() 58 when(mConsentManagerMock.getConsent(any())).thenReturn(AdServicesApiConsent.GIVEN); in testAssertCallerHasApiUserConsent_hasConsent_doesNotThrowOrLogError() 68 when(mConsentManagerMock.getConsent(any())).thenReturn(AdServicesApiConsent.REVOKED); in testAssertCallerHasApiUserConsent_revokedConsent_throwsAndLogsError() 87 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(anyString())) in testAssertAndPersistCallerHasUserConsentForApp_hasConsent_doesNotThrowOrLogError() 99 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(anyString())) in testAssertAndPersistCallerHasUserConsentForApp_revokedConsent_throwsAndLogsError()
|
D | FledgeE2ETest.java | 321 @Mock private ConsentManager mConsentManagerMock; field in FledgeE2ETest 449 when(ConsentManager.getInstance()).thenReturn(mConsentManagerMock); in setUp() 652 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerReportsAdCostCpcBillingEnabled() 655 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerReportsAdCostCpcBillingEnabled() 707 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerWithDataVersionHeaderEnabled() 710 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerWithDataVersionHeaderEnabled() 792 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerWithDataVersionHeaderDisabled() 795 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerWithDataVersionHeaderDisabled() 878 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerReportsAdCostCpcBillingDisabled() 881 .when(mConsentManagerMock) in testFledgeFlowSuccessWithMockServerReportsAdCostCpcBillingDisabled() [all …]
|
/packages/modules/AdServices/adservices/apk/unittest/src/com/android/adservices/adselection/ |
D | AdSelectionServiceTest.java | 66 @Mock private ConsentManager mConsentManagerMock; field in AdSelectionServiceTest 80 verify(mConsentManagerMock, never()).getConsent(); in testBindableAdSelectionServiceKillSwitchOnGaUxEnabled() 81 verify(mConsentManagerMock, never()).getConsent(any()); in testBindableAdSelectionServiceKillSwitchOnGaUxEnabled() 93 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testBindableAdSelectionServiceKillSwitchOffGaUxEnabled() 95 .when(mConsentManagerMock) in testBindableAdSelectionServiceKillSwitchOffGaUxEnabled() 112 verify(mConsentManagerMock, never()).getConsent(); in testBindableAdSelectionServiceKillSwitchOffGaUxEnabled() 113 verify(mConsentManagerMock).getConsent(eq(AdServicesApiType.FLEDGE)); in testBindableAdSelectionServiceKillSwitchOffGaUxEnabled()
|
/packages/modules/AdServices/adservices/apk/unittest/src/com/android/adservices/signals/ |
D | ProtectedSignalsServiceTest.java | 69 @Mock private ConsentManager mConsentManagerMock; field in ProtectedSignalsServiceTest 83 verifyZeroInteractions(mConsentManagerMock); in testBindableProtectedSignalsServiceKillSwitchOnGaUxDisabled() 98 verifyZeroInteractions(mConsentManagerMock); in testBindableProtectedSignalsServiceKillSwitchOnGaUxEnabled() 110 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testBindableProtectedSignalsServiceKillSwitchOffGaUxEnabled() 112 .when(mConsentManagerMock) in testBindableProtectedSignalsServiceKillSwitchOffGaUxEnabled() 128 verify(mConsentManagerMock, never()).getConsent(); in testBindableProtectedSignalsServiceKillSwitchOffGaUxEnabled() 129 verify(mConsentManagerMock).getConsent(eq(AdServicesApiType.FLEDGE)); in testBindableProtectedSignalsServiceKillSwitchOffGaUxEnabled()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/ |
D | BackgroundFetchJobServiceTest.java | 111 @Mock private ConsentManager mConsentManagerMock; field in BackgroundFetchJobServiceTest 172 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobConsentRevokedGaUxDisabled() 174 .when(mConsentManagerMock) in testOnStartJobConsentRevokedGaUxDisabled() 330 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateInterruptedHandled() 332 .when(mConsentManagerMock) in testOnStartJobUpdateInterruptedHandled() 362 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateExecutionExceptionHandled() 364 .when(mConsentManagerMock) in testOnStartJobUpdateExecutionExceptionHandled() 514 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobCustomAudienceKillSwitchOff() 516 .when(mConsentManagerMock) in testOnStartJobCustomAudienceKillSwitchOff() 596 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateSuccess() [all …]
|
D | CustomAudienceServiceImplTest.java | 120 @Mock private ConsentManager mConsentManagerMock; field in CustomAudienceServiceImplTest 151 mConsentManagerMock, in setup() 191 mConsentManagerMock, in teardown() 238 verify(mConsentManagerMock).isFledgeConsentRevokedForAppAfterSettingFledgeUse(any()); in testJoinCustomAudience_runNormally() 254 .when(mConsentManagerMock) in testJoinCustomAudienceWithRevokedUserConsentSuccess() 280 verify(mConsentManagerMock).isFledgeConsentRevokedForAppAfterSettingFledgeUse(any()); in testJoinCustomAudienceWithRevokedUserConsentSuccess() 303 mConsentManagerMock, in testJoinCustomAudience_notInBinderThread() 462 verify(mConsentManagerMock) in testJoinCustomAudience_errorCreateCustomAudience() 519 verify(mConsentManagerMock) in testJoinCustomAudience_errorReturnCallback() 568 verify(mConsentManagerMock).isFledgeConsentRevokedForAppAfterSettingFledgeUse(any()); in testJoinCustomAudience_devOptionsEnabled() [all …]
|
D | ScheduleCustomAudienceUpdateJobServiceTest.java | 100 @Mock private ConsentManager mConsentManagerMock; field in ScheduleCustomAudienceUpdateJobServiceTest 211 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobConsentRevokedGaUxDisabled() 213 .when(mConsentManagerMock) in testOnStartJobConsentRevokedGaUxDisabled() 355 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobScheduleCustomAudienceUpdateKillSwitchOff() 357 .when(mConsentManagerMock) in testOnStartJobScheduleCustomAudienceUpdateKillSwitchOff() 508 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateInterruptedHandled() 509 doReturn(AdServicesApiConsent.GIVEN).when(mConsentManagerMock).getConsent(any()); in testOnStartJobUpdateInterruptedHandled() 556 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateExecutionExceptionHandled() 557 doReturn(AdServicesApiConsent.GIVEN).when(mConsentManagerMock).getConsent(any()); in testOnStartJobUpdateExecutionExceptionHandled() 809 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateTimeoutHandled() [all …]
|
D | ScheduleCustomAudienceUpdateImplTest.java | 85 @Mock private ConsentManager mConsentManagerMock; field in ScheduleCustomAudienceUpdateImplTest 105 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(eq(PACKAGE))) in setup() 126 mConsentManagerMock, in setup() 253 mConsentManagerMock, in testScheduleCustomAudienceUpdate_MissingBuyer_Failure() 289 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(eq(PACKAGE))) in testScheduleCustomAudienceUpdate_MissingConsent_SilentFailure() 295 mConsentManagerMock, in testScheduleCustomAudienceUpdate_MissingConsent_SilentFailure()
|
D | CustomAudienceServiceEndToEndTest.java | 232 @Mock private ConsentManager mConsentManagerMock; field in CustomAudienceServiceEndToEndTest 310 mConsentManagerMock, in setup() 386 mConsentManagerMock, in testJoinCustomAudience_notInBinderThread_fail() 465 .when(mConsentManagerMock) in testJoinCustomAudience_joinTwice_secondJoinOverrideValues() 510 .when(mConsentManagerMock) in testJoinCustomAudienceAppInstallDisabled() 544 .when(mConsentManagerMock) in testJoinCustomAudienceFrequencyCapDisabled() 569 .when(mConsentManagerMock) in testJoinCustomAudience_joinTwice_secondJoinOverrideValuesWithAuctionServerRequestFlags() 604 .when(mConsentManagerMock) in testJoinCustomAudienceWithRevokedUserConsentForAppSuccess() 621 .when(mConsentManagerMock) in testJoinCustomAudience_beyondMaxExpirationTime_fail() 788 .when(mConsentManagerMock) in testFetchAndJoinCustomAudience_overridesJoinCustomAudienceWithAuctionServerReqeustFlagsEnabled() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/ |
D | ProtectedSignalsServiceImplTest.java | 99 @Mock private ConsentManager mConsentManagerMock; field in ProtectedSignalsServiceImplTest 137 mConsentManagerMock, in setup() 167 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(eq(PACKAGE))) in setup() 169 when(mConsentManagerMock.isPasFledgeConsentGiven()).thenReturn(true); in setup() 215 verify(mConsentManagerMock).isFledgeConsentRevokedForAppAfterSettingFledgeUse(eq(PACKAGE)); in testUpdateSignalsSuccess() 334 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(eq(PACKAGE))) in testUpdateSignalsNoConsentIfCallerNotHaveConsent() 337 when(mConsentManagerMock.isPasFledgeConsentGiven()).thenReturn(true); in testUpdateSignalsNoConsentIfCallerNotHaveConsent() 350 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(eq(PACKAGE))) in testUpdateSignalsNoConsentIfUserNotSeenPASNotification() 353 when(mConsentManagerMock.isPasFledgeConsentGiven()).thenReturn(false); in testUpdateSignalsNoConsentIfUserNotSeenPASNotification() 366 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(eq(PACKAGE))) in testUpdateSignalsNoConsent() [all …]
|
D | SignalsIntakeE2ETest.java | 124 @Mock private ConsentManager mConsentManagerMock; field in SignalsIntakeE2ETest 229 when(mConsentManagerMock.isPasFledgeConsentGiven()).thenReturn(true); in setup() 259 mConsentManagerMock, in setupService() 688 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(any())) in testNoConsentCallerPackageHasNoConsent() 690 when(mConsentManagerMock.isPasFledgeConsentGiven()).thenReturn(true); in testNoConsentCallerPackageHasNoConsent() 696 when(mConsentManagerMock.isFledgeConsentRevokedForAppAfterSettingFledgeUse(any())) in testNoConsentUserNotSeenNotification() 698 when(mConsentManagerMock.isPasFledgeConsentGiven()).thenReturn(false); in testNoConsentUserNotSeenNotification()
|
D | SignalsEncodingE2ETest.java | 135 @Mock private ConsentManager mConsentManagerMock; field in SignalsEncodingE2ETest 244 when(mConsentManagerMock.isPasFledgeConsentGiven()).thenReturn(true); in setup() 265 mConsentManagerMock, in setup()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/ |
D | DebugReportSenderJobServiceTest.java | 109 @Mock private ConsentManager mConsentManagerMock; field in DebugReportSenderJobServiceTest 218 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobGaUxFlagDisabled() 220 .when(mConsentManagerMock) in testOnStartJobGaUxFlagDisabled() 248 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobConsentRevokedGaUxDisabled() 250 .when(mConsentManagerMock) in testOnStartJobConsentRevokedGaUxDisabled() 397 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateInterruptedHandled() 399 .when(mConsentManagerMock) in testOnStartJobUpdateInterruptedHandled() 430 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateExecutionExceptionHandled() 432 .when(mConsentManagerMock) in testOnStartJobUpdateExecutionExceptionHandled() 557 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateSuccess() [all …]
|
D | AdSelectionServiceImplTest.java | 303 @Mock private ConsentManager mConsentManagerMock; field in AdSelectionServiceImplTest 423 when(ConsentManager.getInstance()).thenReturn(mConsentManagerMock); in setUp() 534 mConsentManagerMock, in testReportImpressionSuccessWithRegisterAdBeaconDisabled() 662 mConsentManagerMock, in testReportImpressionSuccessCallbackThrowsErrorAuctionServerEnabled() 790 mConsentManagerMock, in testReportImpressionFailureCallbackThrowsErrorAuctionServerEnabled() 911 mConsentManagerMock, in testReportImpressionSuccessCallbackThrowsErrorAuctionServerDisabled() 1039 mConsentManagerMock, in testReportImpressionFailureCallbackThrowsErrorAuctionServerDisabled() 1159 mConsentManagerMock, in testReportImpressionSuccessfullyReportsAdCost() 1295 mConsentManagerMock, in testReportImpressionSuccessfullyReportsDataVersionHeader() 1432 mConsentManagerMock, in testReportImpressionSuccessfullyReportsSellerDataVersionHeader() [all …]
|
D | UpdateAdCounterHistogramWorkerTest.java | 85 @Mock private ConsentManager mConsentManagerMock; field in UpdateAdCounterHistogramWorkerTest 103 mConsentManagerMock, in setup() 183 mConsentManagerMock, in testWorkerFeatureFlagDisabledStopsAndNotifiesFailure() 229 .when(mConsentManagerMock) in testWorkerConsentFailureStopsAndNotifiesSuccess()
|
D | EventReporterFactoryTest.java | 57 @Mock private ConsentManager mConsentManagerMock; field in EventReporterFactoryTest 142 mConsentManagerMock, in getEventReporter()
|
D | ReportAndRegisterEventE2ETest.java | 166 @Mock private ConsentManager mConsentManagerMock; field in ReportAndRegisterEventE2ETest 637 .when(mConsentManagerMock) in testService_ReportingAndRegisteringEnabled_measurementConsentRevoked() 687 .when(mConsentManagerMock) in testService_ReportingAndRegisteringEnabled_noPermissionForARA() 914 .when(mConsentManagerMock) in testService_ReportingAndRegisteringFallbackEnabled_measurementConsentRevoked() 975 .when(mConsentManagerMock) in testService_ReportingAndRegisteringFallbackEnabled_noPermissionForARA() 1053 mConsentManagerMock, in getAdSelectionServiceImpl() 1119 .when(mConsentManagerMock) in enableMeasurementConsentAndARAPermission()
|
D | FrequencyCapFilteringE2ETest.java | 191 @Mock private ConsentManager mConsentManagerMock; field in FrequencyCapFilteringE2ETest 309 mConsentManagerMock, in setup() 477 mConsentManagerMock, in testUpdateHistogramDisabledFeatureFlagNotifiesError() 554 mConsentManagerMock, in testUpdateHistogramExceedingRateLimitNotifiesError() 810 mConsentManagerMock, in testUpdateHistogramBeyondMaxTotalEventCountDoesNotFilterAds() 931 mConsentManagerMock, in testUpdateHistogramBeyondMaxPerBuyerEventCountDoesNotFilterAds()
|
D | AdSelectionE2ETest.java | 626 @Mock private ConsentManager mConsentManagerMock; field in AdSelectionE2ETest 757 mConsentManagerMock, in setUp() 1013 mConsentManagerMock, in testRunAdSelectionSuccess_preV3BiddingLogicWithAdCostCpcBillingEnabled() 1145 mConsentManagerMock, in testRunAdSelectionSuccess_preV3BiddingLogicWithDataVersionHeaderFlagEnabled() 1296 mConsentManagerMock, in testRunAdSelectionSuccess_preV3BiddingLogicWithDataVersionHeaderFlagDisabled() 1443 mConsentManagerMock, in testRunAdSelectionSuccess_preV3BiddingLogicWinnerWithoutBuyerDataVersionHeader() 1571 mConsentManagerMock, in testRunAdSelectionSuccess_preV3BiddingLogicWithAdCostCpcBillingDisabled() 1795 mConsentManagerMock, in testRunAdSelectionSuccess_prebuiltFeatureDisabled_failure() 1899 mConsentManagerMock, in testRunAdSelectionSuccess_flagToPreV3_preV3BiddingLogic() 2094 mConsentManagerMock, in testRunAdSelectionSuccess_v3BiddingLogicWithAdCostCpcBillingEnabled() [all …]
|
D | ReportAndRegisterEventImplTest.java | 172 @Mock private ConsentManager mConsentManagerMock; field in ReportAndRegisterEventImplTest 947 .when(mConsentManagerMock) in testImpl_onlyReportsEvent_measurementConsentRevoked() 993 .when(mConsentManagerMock) in testImpl_onlyReportsEvent_noPermissionForARA() 1185 .when(mConsentManagerMock) in enableARA() 1207 mConsentManagerMock, in getReportAndRegisterEventImpl()
|
D | ReportAndRegisterEventFallbackImplTest.java | 178 @Mock private ConsentManager mConsentManagerMock; field in ReportAndRegisterEventFallbackImplTest 1282 .when(mConsentManagerMock) in testImpl_onlyReportsEvent_measurementConsentRevoked() 1328 .when(mConsentManagerMock) in testImpl_onlyReportsEvent_noPermissionForARA() 1532 .when(mConsentManagerMock) in enableARA() 1554 mConsentManagerMock, in getReportAndRegisterEventFallbackImpl()
|
D | AdSelectionFromOutcomesE2ETest.java | 216 @Mock private ConsentManager mConsentManagerMock; field in AdSelectionFromOutcomesE2ETest 339 mConsentManagerMock, in setUp() 504 mConsentManagerMock, in testSelectAdsFromOutcomesPickHighestSuccessDifferentTables() 587 mConsentManagerMock, in testSelectAdsFromOutcomesPickHighestSuccessUnifiedTables()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/encryption/ |
D | BackgroundKeyFetchJobServiceTest.java | 105 @Mock private ConsentManager mConsentManagerMock; field in BackgroundKeyFetchJobServiceTest 124 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobConsentRevokedGaUxDisabled() 126 .when(mConsentManagerMock) in testOnStartJobConsentRevokedGaUxDisabled() 176 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobAdSelectionDataKillSwitchOff() 178 .when(mConsentManagerMock) in testOnStartJobAdSelectionDataKillSwitchOff() 214 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateSuccessdd() 215 doReturn(AdServicesApiConsent.GIVEN).when(mConsentManagerMock).getConsent(any()); in testOnStartJobUpdateSuccessdd() 247 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateTimeoutHandled() 249 .when(mConsentManagerMock) in testOnStartJobUpdateTimeoutHandled() 276 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in testOnStartJobUpdateExecutionExceptionHandled() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/kanon/ |
D | KAnonSignJoinBackgroundJobServiceTest.java | 84 @Mock private ConsentManager mConsentManagerMock; field in KAnonSignJoinBackgroundJobServiceTest 118 doReturn(mConsentManagerMock).when(() -> ConsentManager.getInstance()); in onStartJob_jobStartsAndJobFinishedLogged() 119 doReturn(AdServicesApiConsent.GIVEN).when(mConsentManagerMock).getConsent(any()); in onStartJob_jobStartsAndJobFinishedLogged()
|