Update the unit test and add key to fragment.
Bug: 298076922 Change-Id: I8ed880c4f81bd76adc27af9bc3ba66f0b4697f74
This commit is contained in:
@@ -113,8 +113,14 @@ public class ContentProtectionPreferenceFragmentTest {
|
||||
final List<String> allKeys =
|
||||
XmlTestUtils.getKeysFromPreferenceXml(
|
||||
mContext, R.layout.content_protection_preference_fragment);
|
||||
final List<String> nonIndexableKeysExpected =
|
||||
List.of(
|
||||
"content_protection_preference_top_intro",
|
||||
"content_protection_preference_subpage_illustration",
|
||||
"content_protection_preference_user_consent_work_profile_switch");
|
||||
|
||||
assertThat(allKeys).containsAtLeastElementsIn(nonIndexableKeys);
|
||||
assertThat(nonIndexableKeys).isEqualTo(nonIndexableKeysExpected);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -132,7 +138,7 @@ public class ContentProtectionPreferenceFragmentTest {
|
||||
XmlTestUtils.getKeysFromPreferenceXml(
|
||||
mContext, R.layout.content_protection_preference_fragment);
|
||||
|
||||
assertThat(nonIndexableKeys).containsAnyIn(allKeys);
|
||||
assertThat(nonIndexableKeys).isEqualTo(allKeys);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user