Add Settings keywords for Styles & Wallpaper.
Reusing existing strings since this is coming in after string freeze. TODO: create a new keyword string for this preference. Fixes: 130759285 Test: m RunSettingsRoboTests and searching keywords on device Change-Id: Ice1bc34b381302745cb55056377cc94ea74e8d50
This commit is contained in:
@@ -115,6 +115,30 @@ public class WallpaperPreferenceControllerTest {
|
||||
assertThat(mController.areStylesAvailable()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getKeywords_withoutStyles() {
|
||||
mShadowPackageManager.setResolveInfosForIntent(
|
||||
mStylesAndWallpaperIntent, Lists.newArrayList());
|
||||
|
||||
assertThat(mController.getKeywords())
|
||||
.contains(mContext.getString(R.string.keywords_wallpaper));
|
||||
assertThat(mController.getKeywords())
|
||||
.doesNotContain(mContext.getString(R.string.theme_customization_category));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getKeywords_withStyles() {
|
||||
mShadowPackageManager.setResolveInfosForIntent(
|
||||
mStylesAndWallpaperIntent,
|
||||
Lists.newArrayList(mock(ResolveInfo.class)));
|
||||
|
||||
assertThat(mController.areStylesAvailable()).isTrue();
|
||||
assertThat(mController.getKeywords())
|
||||
.contains(mContext.getString(R.string.keywords_wallpaper));
|
||||
assertThat(mController.getKeywords())
|
||||
.contains(mContext.getString(R.string.theme_customization_category));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void handlePreferenceTreeClick_wallpaperOnly() {
|
||||
mShadowPackageManager.setResolveInfosForIntent(
|
||||
|
Reference in New Issue
Block a user