commit | cbc5239cee68e0975a0a55f9071c4ef31155407b | [log] [tgz] |
---|---|---|
author | Fan Zhang <zhfan@google.com> | Tue Mar 27 21:40:46 2018 -0700 |
committer | Fan Zhang <zhfan@google.com> | Tue Mar 27 21:43:41 2018 -0700 |
tree | 5d6b807e7682c5408312139cd61c3cb102f949b5 | |
parent | 0a5367c0c4f8b65e0bc1a7ce0e4d8b7ceca45c5b [diff] |
Fix robotest failure Change-Id: Ic584aab213fa7af8f6f79e10743710be6840c2ee Fixes: 77161730 Test: robotest
diff --git a/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java index b651c8e..122a056 100644 --- a/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/deviceinfo/storage/StorageItemPreferenceControllerTest.java
@@ -217,8 +217,10 @@ @Test public void testClickFiles() { when(mSvp.findEmulatedForPrivate(nullable(VolumeInfo.class))).thenReturn(mVolume); + when(mVolume.buildBrowseIntent()).thenReturn(new Intent()); mPreference.setKey("pref_files"); - mController.handlePreferenceTreeClick(mPreference); + assertThat(mController.handlePreferenceTreeClick(mPreference)) + .isTrue(); final ArgumentCaptor<Intent> argumentCaptor = ArgumentCaptor.forClass(Intent.class); verify(mFragment.getActivity()).startActivityAsUser(argumentCaptor.capture(),