Purify SettingsActivity from old search code.

Bug:35763944, 32590887
Test: make RunSettingsRoboTests
Change-Id: Id8140b68a676e595bff095546fa119cd3ced2c4a
This commit is contained in:
Matthew Fritze
2017-03-16 13:19:20 -07:00
parent 8973e2786d
commit 0b431fc003
11 changed files with 8 additions and 1048 deletions

View File

@@ -30,7 +30,6 @@ import org.mockito.MockitoAnnotations;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.doReturn;
@@ -59,20 +58,6 @@ public class SettingsActivityTest {
doReturn(mBitmap).when(mActivity).getBitmapFromXmlResource(anyInt());
}
@Test
public void testQueryTextChange_shouldUpdate() {
final String testQuery = "abc";
assertThat(mActivity.mSearchQuery).isNull();
try {
mActivity.onQueryTextChange(testQuery);
} catch (NullPointerException e) {
// Expected, because searchFeatureProvider is not wired up.
}
assertThat(mActivity.mSearchQuery).isEqualTo(testQuery);
}
@Test
public void launchSettingFragment_nullExtraShowFragment_shouldNotCrash()
throws ClassNotFoundException {