Loading tests/functional/com/android/documentsui/ActivityTestJunit4.kt +3 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,9 @@ abstract class ActivityTestJunit4<T : Activity?> { @JvmField var context: Context? = null var userId: UserId? = null @JvmField protected var userId: UserId? = null var automation: UiAutomation? = null @JvmField Loading tests/functional/com/android/documentsui/InternalStorageUiTest.java +14 −14 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.documentsui; import static org.junit.Assert.assertNull; import androidx.test.filters.LargeTest; import com.android.documentsui.base.Providers; Loading @@ -23,26 +25,24 @@ import com.android.documentsui.base.RootInfo; import com.android.documentsui.files.FilesActivity; import com.android.documentsui.filters.HugeLongTest; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * A Ui test will do tests in the internal storage root. It is implemented because some operations * is failed and its result will different from the test on the StubProvider. b/115304092 is a * example which only happen on root from ExternalStorageProvidrer. * example which only happen on root from ExternalStorageProvider. */ @LargeTest public class InternalStorageUiTest extends ActivityTest<FilesActivity> { public class InternalStorageUiTest extends ActivityTestJunit4<FilesActivity> { private static final String fileName = "!Test3345678"; private static final String newFileName = "!9527Test"; private RootInfo rootPrimary; public InternalStorageUiTest() { super(FilesActivity.class); } @Override public void setUp() throws Exception { super.setUp(); @Before public void setUpTest() throws Exception { mDocsHelper = new DocumentsProviderHelper(userId, Providers.AUTHORITY_STORAGE, context, Providers.AUTHORITY_STORAGE); rootPrimary = mDocsHelper.getRoot(Providers.ROOT_ID_DEVICE); Loading @@ -51,13 +51,13 @@ public class InternalStorageUiTest extends ActivityTest<FilesActivity> { deleteTestFiles(); } @Override public void tearDown() throws Exception { @After public void tearDownTest() throws Exception { deleteTestFiles(); super.tearDown(); } @HugeLongTest @Test public void testRenameFile() throws Exception { createTestFiles(); Loading Loading @@ -97,7 +97,7 @@ public class InternalStorageUiTest extends ActivityTest<FilesActivity> { if (selected) { bots.main.clickDelete(); device.waitForIdle(); bots.main.clickDialogOkButton(); bots.main.clickNonTextDialogOkButton(); } } } Loading
tests/functional/com/android/documentsui/ActivityTestJunit4.kt +3 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,9 @@ abstract class ActivityTestJunit4<T : Activity?> { @JvmField var context: Context? = null var userId: UserId? = null @JvmField protected var userId: UserId? = null var automation: UiAutomation? = null @JvmField Loading
tests/functional/com/android/documentsui/InternalStorageUiTest.java +14 −14 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.documentsui; import static org.junit.Assert.assertNull; import androidx.test.filters.LargeTest; import com.android.documentsui.base.Providers; Loading @@ -23,26 +25,24 @@ import com.android.documentsui.base.RootInfo; import com.android.documentsui.files.FilesActivity; import com.android.documentsui.filters.HugeLongTest; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * A Ui test will do tests in the internal storage root. It is implemented because some operations * is failed and its result will different from the test on the StubProvider. b/115304092 is a * example which only happen on root from ExternalStorageProvidrer. * example which only happen on root from ExternalStorageProvider. */ @LargeTest public class InternalStorageUiTest extends ActivityTest<FilesActivity> { public class InternalStorageUiTest extends ActivityTestJunit4<FilesActivity> { private static final String fileName = "!Test3345678"; private static final String newFileName = "!9527Test"; private RootInfo rootPrimary; public InternalStorageUiTest() { super(FilesActivity.class); } @Override public void setUp() throws Exception { super.setUp(); @Before public void setUpTest() throws Exception { mDocsHelper = new DocumentsProviderHelper(userId, Providers.AUTHORITY_STORAGE, context, Providers.AUTHORITY_STORAGE); rootPrimary = mDocsHelper.getRoot(Providers.ROOT_ID_DEVICE); Loading @@ -51,13 +51,13 @@ public class InternalStorageUiTest extends ActivityTest<FilesActivity> { deleteTestFiles(); } @Override public void tearDown() throws Exception { @After public void tearDownTest() throws Exception { deleteTestFiles(); super.tearDown(); } @HugeLongTest @Test public void testRenameFile() throws Exception { createTestFiles(); Loading Loading @@ -97,7 +97,7 @@ public class InternalStorageUiTest extends ActivityTest<FilesActivity> { if (selected) { bots.main.clickDelete(); device.waitForIdle(); bots.main.clickDialogOkButton(); bots.main.clickNonTextDialogOkButton(); } } }