Fix tests for SecurityAdvancedSettings.

It seems these tests have been failing for a while (probably they were never passing in the first place; as the issue appears to be with the tests and not the prod code).

Are they not being run on pre and/or post-submit?

Bug: 323650746
Change-Id: I97db7183898930792d1ff0d2de592f26f8b78b01
Test: atest SecurityAdvancedSettingsTest
This commit is contained in:
Elliot Sisteron
2024-02-05 12:58:21 +00:00
parent 6b64e92fc8
commit 5418e292c9

View File

@@ -107,7 +107,7 @@ public class SecurityAdvancedSettingsTest {
@Test @Test
public void whenSafetyCenterIsEnabled_pageIndexExcluded() throws Exception { public void whenSafetyCenterIsEnabled_pageIndexExcluded() throws Exception {
when(mSafetyCenterManagerWrapper.isEnabled(any())).thenReturn(false); when(mSafetyCenterManagerWrapper.isEnabled(any())).thenReturn(true);
BaseSearchIndexProvider indexProvider = SecurityAdvancedSettings.SEARCH_INDEX_DATA_PROVIDER; BaseSearchIndexProvider indexProvider = SecurityAdvancedSettings.SEARCH_INDEX_DATA_PROVIDER;
List<String> allXmlKeys = TestUtils.getAllXmlKeys(mContext, indexProvider); List<String> allXmlKeys = TestUtils.getAllXmlKeys(mContext, indexProvider);