/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | GlobalSearchLoaderTest.java | 39 import com.android.documentsui.testing.TestProvidersAccess; 89 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 98 TestProvidersAccess.USER_ID); in setUp() 102 mEnv.mockProviders.get(TestProvidersAccess.DOWNLOADS.authority) in setUp() 105 TestProvidersAccess.DOWNLOADS.flags |= DocumentsContract.Root.FLAG_SUPPORTS_SEARCH; in setUp() 110 TestProvidersAccess.DOWNLOADS.flags &= ~DocumentsContract.Root.FLAG_SUPPORTS_SEARCH; in tearDown() 115 TestProvidersAccess.PICKLES.flags |= DocumentsContract.Root.FLAG_LOCAL_ONLY; in testNotSearchableRoot_beIgnored() 116 assertTrue(mLoader.shouldIgnoreRoot(TestProvidersAccess.PICKLES)); in testNotSearchableRoot_beIgnored() 117 TestProvidersAccess.PICKLES.flags &= ~DocumentsContract.Root.FLAG_LOCAL_ONLY; in testNotSearchableRoot_beIgnored() 123 TestProvidersAccess.PICKLES.flags |= DocumentsContract.Root.FLAG_SUPPORTS_SEARCH; in testNotLocalOnlyRoot_beIgnored() [all …]
|
D | DragAndDropManagerTests.java | 50 import com.android.documentsui.testing.TestProvidersAccess; 153 TestProvidersAccess.HOME, in testStartDrag_SetsCorrectClipData() 168 TestProvidersAccess.HOME, in testStartDrag_SetsCorrectClipData_NullParent() 183 TestProvidersAccess.HOME, in testStartDrag_BuildsCorrectShadow_SingleDoc() 198 TestProvidersAccess.HOME, in testStartDrag_BuildsCorrectShadow_MultipleDocs() 215 TestProvidersAccess.HOME, in testCanSpringOpen_ReturnsFalse_RootNotSupportCreate() 222 assertFalse(mManager.canSpringOpen(TestProvidersAccess.HAMMY, TestEnv.FOLDER_2)); in testCanSpringOpen_ReturnsFalse_RootNotSupportCreate() 231 TestProvidersAccess.HOME, in testInArchiveUris_HasCorrectFlagPermission() 245 TestProvidersAccess.HOME, in testCanSpringOpen_ReturnsFalse_DocIsInvalidDestination() 252 assertFalse(mManager.canSpringOpen(TestProvidersAccess.DOWNLOADS, TestEnv.FOLDER_1)); in testCanSpringOpen_ReturnsFalse_DocIsInvalidDestination() [all …]
|
D | AbstractActionHandlerTest.java | 48 import com.android.documentsui.testing.TestProvidersAccess; 99 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 156 TestProvidersAccess.HOME.rootId, in testOpensContainerDocuments_OpenFolderInSearch_JumpsToNewLocation() 200 TestProvidersAccess.HOME.rootId, in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider() 235 TestProvidersAccess.HOME.rootId, in testLaunchToDocuments() 248 DocumentStackAsserts.assertEqualsTo(mEnv.state.stack, TestProvidersAccess.HOME, in testLaunchToDocuments() 261 TestProvidersAccess.HOME.rootId, in testLaunchToDocuments_convertsTreeUriToDocumentUri() 270 TestProvidersAccess.HOME.authority, TestEnv.FOLDER_0.documentId); in testLaunchToDocuments_convertsTreeUriToDocumentUri() 277 DocumentStackAsserts.assertEqualsTo(mEnv.state.stack, TestProvidersAccess.HOME, in testLaunchToDocuments_convertsTreeUriToDocumentUri() 285 mEnv.state.stack.changeRoot(TestProvidersAccess.HOME); in testLoadChildrenDocuments() [all …]
|
D | RecentsLoaderTests.java | 41 import com.android.documentsui.testing.TestProvidersAccess; 93 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.OtherUser.USER_ID, true); in setUp() 100 TestProvidersAccess.USER_ID); in setUp() 105 assertTrue(mLoader.shouldIgnoreRoot(TestProvidersAccess.PICKLES)); in testNotLocalOnlyRoot_beIgnored() 110 assertFalse(mLoader.shouldIgnoreRoot(TestProvidersAccess.DOWNLOADS)); in testLocalOnlyRoot_supportRecent_notIgnored() 115 assertTrue(mLoader.shouldIgnoreRoot(TestProvidersAccess.OtherUser.DOWNLOADS)); in testLocalOnlyRoot_supportRecent_differentUser_beIgnored() 123 mEnv.mockProviders.get(TestProvidersAccess.HOME.authority) in testDocumentsNotIncludeDirectory() 140 mEnv.mockProviders.get(TestProvidersAccess.HOME.authority) in testShowOrHideHiddenFiles() 159 mEnv.mockProviders.get(TestProvidersAccess.HOME.authority) in testDocumentsNotMovable() 187 mEnv.mockProviders.get(TestProvidersAccess.HOME.authority) in testContentsUpdate_observable() [all …]
|
D | IconUtilsTest.java | 23 import com.android.documentsui.testing.TestProvidersAccess; 89 IconUtils.loadPackageIcon(context, TestProvidersAccess.USER_ID, authority, icon, in testLoadPackageIcon() 94 TestProvidersAccess.USER_HANDLE); in testLoadPackageIcon() 112 IconUtils.loadPackageIcon(context, TestProvidersAccess.USER_ID, authority, icon, in testLoadPackageIcon_maybeShowBadge() 116 verify(packageManager).getUserBadgedIcon(drawable, TestProvidersAccess.USER_HANDLE); in testLoadPackageIcon_maybeShowBadge()
|
D | DocumentsAccessTest.java | 29 import com.android.documentsui.testing.TestProvidersAccess; 79 mDocumentsAccess.getDocuments(TestProvidersAccess.OtherUser.USER_ID, "authority", in testCreateDocument_noPermission()
|
D | ProfileTabsTest.java | 34 import com.android.documentsui.testing.TestProvidersAccess; 91 mState.stack.changeRoot(TestProvidersAccess.DOWNLOADS); in setUp() 108 mTestCommonAddons.mCurrentRoot = TestProvidersAccess.DOWNLOADS; in setUp() 179 mState.stack.changeRoot(TestProvidersAccess.RECENTS); in testUpdateView_twoUsers_recents_subFolder_shouldHide() 192 mState.stack.changeRoot(TestProvidersAccess.PICKLES); in testUpdateView_twoUsers_thirdParty_shouldHide()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/dirlist/ |
D | AppsRowManagerTest.java | 47 import com.android.documentsui.testing.TestProvidersAccess; 112 when(mActivity.getSelectedUser()).thenReturn(TestProvidersAccess.USER_ID); in setUp() 124 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID, in getAppsRowManager() 125 TestProvidersAccess.AnotherUser.USER_ID); in getAppsRowManager() 131 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID); in getAppsRowManager() 140 rootList.add(new RootItem(TestProvidersAccess.INSPECTOR, mActionHandler, mMaybeShowBadge)); in testUpdateList_byRootItem() 141 rootList.add(new RootItem(TestProvidersAccess.PICKLES, mActionHandler, mMaybeShowBadge)); in testUpdateList_byRootItem() 142 rootList.add(new RootItem(TestProvidersAccess.PICKLES, mActionHandler, "packageName", in testUpdateList_byRootItem() 144 rootList.add(new RootItem(TestProvidersAccess.PICKLES, mActionHandler, "packageName", in testUpdateList_byRootItem() 150 assertEquals(TestProvidersAccess.INSPECTOR.title, chipDataList.get(0).getTitle()); in testUpdateList_byRootItem() [all …]
|
D | InflateMessageDocumentHolderTest.java | 40 import com.android.documentsui.testing.TestProvidersAccess; 94 userIdToLabelMap.put(TestProvidersAccess.USER_ID, "Personal"); in setUp() 95 userIdToLabelMap.put(TestProvidersAccess.OtherUser.USER_ID, "Work"); in setUp() 96 env.getDisplayState().canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 98 TestProvidersAccess.OtherUser.USER_ID, true); in setUp() 101 userIdToLabelMap.put(TestProvidersAccess.AnotherUser.USER_ID, "Private"); in setUp() 103 TestProvidersAccess.AnotherUser.USER_ID, true); in setUp() 110 when(userManager.getUserProperties(TestProvidersAccess.OtherUser.USER_HANDLE)) in setUp() 112 when(userManager.getUserProperties(TestProvidersAccess.AnotherUser.USER_HANDLE)) in setUp() 117 TestProvidersAccess.USER_ID, in setUp() [all …]
|
D | MessageTest.java | 54 import com.android.documentsui.testing.TestProvidersAccess; 127 userIdToLabelMap.put(TestProvidersAccess.USER_ID, personalLabel); in setUp() 130 TestProvidersAccess.USER_ID, mUserId, userIdToLabelMap, mUserManager, in setUp()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sidebar/ |
D | RootsFragmentTest.java | 37 import com.android.documentsui.testing.TestProvidersAccess; 69 TestProvidersAccess.RECENTS.title, 70 TestProvidersAccess.IMAGE.title, 71 TestProvidersAccess.VIDEO.title, 72 TestProvidersAccess.AUDIO.title, 73 TestProvidersAccess.DOCUMENT.title, 74 TestProvidersAccess.DOWNLOADS.title, 76 TestProvidersAccess.EXTERNALSTORAGE.title, 77 TestProvidersAccess.HAMMY.title, 79 TestProvidersAccess.INSPECTOR.title, [all …]
|
D | RootItemListBuilderTest.java | 25 import com.android.documentsui.testing.TestProvidersAccess; 43 new RootItem(TestProvidersAccess.DOWNLOADS, null, false); 45 new RootItem(TestProvidersAccess.HAMMY, null, false); 47 new RootItem(TestProvidersAccess.HOME, null, false); 49 new RootItem(TestProvidersAccess.IMAGE, null, false); 51 new RootItem(TestProvidersAccess.PICKLES, null, false); 53 new RootItem(TestProvidersAccess.SD_CARD, null, false); 56 new RootItem(TestProvidersAccess.OtherUser.DOWNLOADS, null, false); 58 new RootItem(TestProvidersAccess.OtherUser.HOME, null, false); 60 new RootItem(TestProvidersAccess.OtherUser.IMAGE, null, false); [all …]
|
D | UserItemsCombinerTest.java | 33 import com.android.documentsui.testing.TestProvidersAccess; 56 private static final UserId PERSONAL_USER = TestProvidersAccess.USER_ID; 57 private static final UserId WORK_USER = TestProvidersAccess.OtherUser.USER_ID; 58 private static final UserId PRIVATE_USER = TestProvidersAccess.AnotherUser.USER_ID;
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/picker/ |
D | ActionHandlerTest.java | 57 import com.android.documentsui.testing.TestProvidersAccess; 115 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 169 mEnv.state.stack.changeRoot(TestProvidersAccess.DOWNLOADS); in testInitLocation_RestoresIfStackIsLoaded() 178 mEnv.state.stack.changeRoot(TestProvidersAccess.HAMMY); in testInitLocation_LoadsRootDocIfStackOnlyHasRoot() 181 assertRootPicked(TestProvidersAccess.HAMMY.getUri()); in testInitLocation_LoadsRootDocIfStackOnlyHasRoot() 189 assertRootPicked(TestProvidersAccess.DOWNLOADS.getUri()); in testInitLocation_CopyDestination_DefaultsToDownloads() 203 TestProvidersAccess.HOME.rootId, in testInitLocation_LaunchToDocuments() 219 DocumentStackAsserts.assertEqualsTo(mEnv.state.stack, TestProvidersAccess.HOME, in testInitLocation_LaunchToDocuments() 227 new DocumentStack(TestProvidersAccess.HAMMY, TestEnv.FOLDER_0, TestEnv.FOLDER_1); in testInitLocation_RestoresLastAccessedStack() 258 assertRootPicked(TestProvidersAccess.EXTERNALSTORAGE.getUri()); in testInitLocation_DefaultToDeviceRoot_ActionOpenTree() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/files/ |
D | ActionHandlerTest.java | 71 import com.android.documentsui.testing.TestProvidersAccess; 134 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 331 mActivity.currentRoot = TestProvidersAccess.HOME; in testDocumentPicked_DefaultsToView() 341 mActivity.currentRoot = TestProvidersAccess.HOME; in testDocumentPicked_InArchive_QuickViewable() 350 mActivity.currentRoot = TestProvidersAccess.HOME; in testDocumentPicked_InArchive_Unopenable() 360 mActivity.currentRoot = TestProvidersAccess.HOME; in testDocumentPicked_PreviewsWhenResourceSet() 369 mActivity.currentRoot = TestProvidersAccess.DOWNLOADS; in testDocumentPicked_Downloads_ManagesApks() 370 TestEnv.FILE_APK.authority = TestProvidersAccess.DOWNLOADS.authority; in testDocumentPicked_Downloads_ManagesApks() 379 mActivity.currentRoot = TestProvidersAccess.DOWNLOADS; in testDocumentPicked_Downloads_ManagesPartialFiles() 380 TestEnv.FILE_PARTIAL.authority = TestProvidersAccess.DOWNLOADS.authority; in testDocumentPicked_Downloads_ManagesPartialFiles() [all …]
|
D | QuickViewIntentBuilderTest.java | 24 import com.android.documentsui.testing.TestProvidersAccess; 145 TestProvidersAccess.OtherUser.USER_ID); in testBuild_twoProfiles_containsOnlyPreviewDocument()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/ |
D | PickActivityTest.java | 37 import com.android.documentsui.testing.TestProvidersAccess; 99 doc.userId = TestProvidersAccess.USER_ID; in testOnDocumentPicked() 107 pickActivity.mState.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in testOnDocumentPicked() 124 doc.userId = TestProvidersAccess.OtherUser.USER_ID; in testOnDocumentPicked_otherUser() 132 pickActivity.mState.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in testOnDocumentPicked_otherUser() 134 TestProvidersAccess.OtherUser.USER_ID, true); in testOnDocumentPicked_otherUser() 150 doc.userId = TestProvidersAccess.OtherUser.USER_ID; in testOnDocumentPicked_otherUserDoesNotReturn() 158 pickActivity.mState.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in testOnDocumentPicked_otherUserDoesNotReturn()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestEnv.java | 71 public final TestProvidersAccess providers = new TestProvidersAccess(); 90 this.userId = TestProvidersAccess.USER_ID; in TestEnv() 95 modelOtherUser = new TestModel(TestProvidersAccess.OtherUser.USER_ID, authority, features); in TestEnv() 130 return create(features, TestProvidersAccess.HOME.authority); in create() 134 return create(TestProvidersAccess.HOME.authority); in create() 194 ModelId.build(model.mUserId, TestProvidersAccess.HOME.authority, "1")); in populateStack() 201 state.stack.changeRoot(TestProvidersAccess.HOME); in populateStack()
|
D | TestProvidersAccess.java | 37 public class TestProvidersAccess implements ProvidersAccess { class 57 UserId userId = TestProvidersAccess.USER_ID; 173 TestProvidersAccess.USER_ID.getIdentifier() + 1); 234 TestProvidersAccess.USER_ID.getIdentifier() + 2); 296 public TestProvidersAccess() { in TestProvidersAccess() method in TestProvidersAccess 313 pm.addStubContentProviderForRoot(TestProvidersAccess.DOWNLOADS); in configurePm() 314 pm.addStubContentProviderForRoot(TestProvidersAccess.HOME); in configurePm() 315 pm.addStubContentProviderForRoot(TestProvidersAccess.HAMMY); in configurePm() 316 pm.addStubContentProviderForRoot(TestProvidersAccess.PICKLES); in configurePm() 317 pm.addStubContentProviderForRoot(TestProvidersAccess.NO_TREE_ROOT); in configurePm()
|
D | TestResources.java | 61 res.setDefaultDocumentsUri(TestProvidersAccess.DOWNLOADS.getUri().toString()); in create()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | DocumentInfoTest.java | 36 import com.android.documentsui.testing.TestProvidersAccess; 167 otherUserDoc.userId = TestProvidersAccess.OtherUser.USER_ID; in testGetTreeDocumentUri_otherUser_shouldHaveDifferentUri() 179 otherUserDoc.userId = TestProvidersAccess.OtherUser.USER_ID; in testGetTreeDocumentUri_otherUser_sameHostAndPath() 194 otherUserDoc.userId = TestProvidersAccess.OtherUser.USER_ID; in testGetTreeDocumentUri_otherUser_userInfo()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/dirlist/ |
D | ModelBackedDocumentsAdapterTest.java | 31 import com.android.documentsui.testing.TestProvidersAccess; 55 TestProvidersAccess.OtherUser.USER_ID, null, mTestConfigStore), in setUp()
|
D | DirectoryAddonsAdapterPrivateSpaceTest.java | 42 import com.android.documentsui.testing.TestProvidersAccess; 53 private static final UserId CURRENT_USER = TestProvidersAccess.USER_ID; 54 private static final UserId SELECTED_USER = TestProvidersAccess.OtherUser.USER_ID;
|
D | DirectoryAddonsAdapterTest.java | 36 import com.android.documentsui.testing.TestProvidersAccess; 64 null, TestProvidersAccess.OtherUser.USER_ID, null, in setUp()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/inspector/ |
D | InspectorControllerTest.java | 53 import com.android.documentsui.testing.TestProvidersAccess; 121 new TestProvidersAccess(), in recreateController()
|