Fix some test cases fail

Test: robo test
Fixes: 125599276
Change-Id: I4b1b15f69ff3021e4330bed49ac95ea871b98e92
This commit is contained in:
tmfang
2019-02-22 15:46:38 +08:00
parent 193af336bc
commit 8b414c9a14
4 changed files with 10 additions and 10 deletions

View File

@@ -84,11 +84,9 @@ public class DefaultBrowserPreferenceControllerTest {
@Test
public void isAvailable_hasBrowser_shouldReturnTrue() {
final ResolveInfo info = new ResolveInfo();
info.activityInfo = new ActivityInfo();
info.handleAllWebDataURI = true;
when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt()))
.thenReturn(Collections.singletonList(info));
.thenReturn(Collections.singletonList(createResolveInfo("com.test.pkg")));
assertThat(mController.isAvailable()).isTrue();
}