Prepare tests for impending robolectric merge
Some ShadowUserManager function moved into the basic shadow in robolectric proper and has been removed from the Settings ShadowUserManager. Test: make -j56 RunSettingsRoboTests Change-Id: I38647dae5d16bc79bc7925ca139c9362a2035393
This commit is contained in:
@@ -365,6 +365,8 @@ public class DashboardFeatureProviderImplTest {
|
||||
|
||||
@Test
|
||||
public void openTileIntent_profileSelectionDialog_shouldShow() {
|
||||
ShadowUserManager.getShadow().addUser(10, "Someone", 0);
|
||||
|
||||
final Tile tile = new Tile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE);
|
||||
final ArrayList<UserHandle> handles = new ArrayList<>();
|
||||
handles.add(new UserHandle(0));
|
||||
@@ -379,6 +381,8 @@ public class DashboardFeatureProviderImplTest {
|
||||
|
||||
@Test
|
||||
public void openTileIntent_profileSelectionDialog_explicitMetadataShouldShow() {
|
||||
ShadowUserManager.getShadow().addUser(10, "Someone", 0);
|
||||
|
||||
mActivityInfo.metaData.putString(META_DATA_KEY_PROFILE, PROFILE_ALL);
|
||||
final Tile tile = new Tile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE);
|
||||
final ArrayList<UserHandle> handles = new ArrayList<>();
|
||||
@@ -394,6 +398,8 @@ public class DashboardFeatureProviderImplTest {
|
||||
|
||||
@Test
|
||||
public void openTileIntent_profileSelectionDialog_shouldNotShow() {
|
||||
ShadowUserManager.getShadow().addUser(10, "Someone", 0);
|
||||
|
||||
mActivityInfo.metaData.putString(META_DATA_KEY_PROFILE, PROFILE_PRIMARY);
|
||||
final Tile tile = new Tile(mActivityInfo, CategoryKey.CATEGORY_HOMEPAGE);
|
||||
final ArrayList<UserHandle> handles = new ArrayList<>();
|
||||
|
Reference in New Issue
Block a user