diff options
author | TYM Tsai <tymtsai@google.com> | 2022-09-22 23:41:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-09-22 23:41:14 +0000 |
commit | 669002a047bf7352c6e308cfea8844896009bf12 (patch) | |
tree | 1d4d6c1f6a8e7048c3b13d32444349fa645641e5 | |
parent | e45a50741116ceee0e691d2fb84f7a2e6cc0f7c2 (diff) | |
parent | 1924cc539854e4f204d80759254d2252dbea150b (diff) | |
download | cts-669002a047bf7352c6e308cfea8844896009bf12.tar.gz |
Merge "Add test for adding log for authentication" into tm-qpr-dev
-rw-r--r-- | tests/autofillservice/src/android/autofillservice/cts/commontests/FillEventHistoryCommonTestCase.java | 4 | ||||
-rw-r--r-- | tests/autofillservice/src/android/autofillservice/cts/testcore/Helper.java | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/tests/autofillservice/src/android/autofillservice/cts/commontests/FillEventHistoryCommonTestCase.java b/tests/autofillservice/src/android/autofillservice/cts/commontests/FillEventHistoryCommonTestCase.java index 9ab86ce3ec3..8ca37c4af3b 100644 --- a/tests/autofillservice/src/android/autofillservice/cts/commontests/FillEventHistoryCommonTestCase.java +++ b/tests/autofillservice/src/android/autofillservice/cts/commontests/FillEventHistoryCommonTestCase.java @@ -135,7 +135,7 @@ public abstract class FillEventHistoryCommonTestCase extends AbstractLoginActivi assertFillEventForDatasetShown(events.get(0), "clientStateKey", "clientStateValue", presentationType); assertFillEventForDatasetAuthenticationSelected(events.get(1), "name", - "clientStateKey", "clientStateValue"); + "clientStateKey", "clientStateValue", presentationType); } @Test @@ -180,7 +180,7 @@ public abstract class FillEventHistoryCommonTestCase extends AbstractLoginActivi assertFillEventForDatasetShown(events.get(0), "clientStateKey", "clientStateValue", presentationType); assertFillEventForAuthenticationSelected(events.get(1), NULL_DATASET_ID, - "clientStateKey", "clientStateValue"); + "clientStateKey", "clientStateValue", presentationType); assertFillEventForDatasetShown(events.get(2), "clientStateKey", "clientStateValue", presentationType); assertFillEventForDatasetSelected(events.get(3), "name", diff --git a/tests/autofillservice/src/android/autofillservice/cts/testcore/Helper.java b/tests/autofillservice/src/android/autofillservice/cts/testcore/Helper.java index 3a40ca9eff7..c462baf4a6d 100644 --- a/tests/autofillservice/src/android/autofillservice/cts/testcore/Helper.java +++ b/tests/autofillservice/src/android/autofillservice/cts/testcore/Helper.java @@ -1254,12 +1254,12 @@ public final class Helper { * @param event event to be asserted * @param key the only key expected in the client state bundle * @param value the only value expected in the client state bundle - * @param expectedPresentation the exptected ui presentation type + * @param uiType the expected ui presentation type */ public static void assertFillEventForDatasetShown(@NonNull FillEventHistory.Event event, - @NonNull String key, @NonNull String value, int expectedPresentation) { + @NonNull String key, @NonNull String value, int uiType) { assertFillEvent(event, TYPE_DATASETS_SHOWN, NULL_DATASET_ID, key, value, null); - assertFillEventPresentationType(event, expectedPresentation); + assertFillEventPresentationType(event, uiType); } /** @@ -1269,9 +1269,9 @@ public final class Helper { * @param event event to be asserted */ public static void assertFillEventForDatasetShown(@NonNull FillEventHistory.Event event, - int expectedPresentation) { + int uiType) { assertFillEvent(event, TYPE_DATASETS_SHOWN, NULL_DATASET_ID, null, null, null); - assertFillEventPresentationType(event, expectedPresentation); + assertFillEventPresentationType(event, uiType); } /** @@ -1283,11 +1283,13 @@ public final class Helper { * @param datasetId dataset set id expected in the event * @param key the only key expected in the client state bundle * @param value the only value expected in the client state bundle + * @param uiType the expected ui presentation type */ public static void assertFillEventForDatasetAuthenticationSelected( @NonNull FillEventHistory.Event event, - @Nullable String datasetId, @NonNull String key, @NonNull String value) { + @Nullable String datasetId, @NonNull String key, @NonNull String value, int uiType) { assertFillEvent(event, TYPE_DATASET_AUTHENTICATION_SELECTED, datasetId, key, value, null); + assertFillEventPresentationType(event, uiType); } /** @@ -1298,11 +1300,13 @@ public final class Helper { * @param datasetId dataset set id expected in the event * @param key the only key expected in the client state bundle * @param value the only value expected in the client state bundle + * @param uiType the expected ui presentation type */ public static void assertFillEventForAuthenticationSelected( @NonNull FillEventHistory.Event event, - @Nullable String datasetId, @NonNull String key, @NonNull String value) { + @Nullable String datasetId, @NonNull String key, @NonNull String value, int uiType) { assertFillEvent(event, TYPE_AUTHENTICATION_SELECTED, datasetId, key, value, null); + assertFillEventPresentationType(event, uiType); } public static void assertFillEventForFieldsClassification(@NonNull FillEventHistory.Event event, |