Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75b050df authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix test case in ActionHandlerTest" into main

parents cf0e5c4b b9ecf91d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.documentsui.files;

import static com.android.documentsui.util.FlagUtils.isUseMaterial3FlagEnabled;
import static com.android.documentsui.testing.IntentAsserts.assertHasAction;
import static com.android.documentsui.testing.IntentAsserts.assertHasData;
import static com.android.documentsui.testing.IntentAsserts.assertHasExtra;
@@ -24,6 +23,8 @@ import static com.android.documentsui.testing.IntentAsserts.assertHasExtraIntent
import static com.android.documentsui.testing.IntentAsserts.assertHasExtraList;
import static com.android.documentsui.testing.IntentAsserts.assertHasExtraUri;
import static com.android.documentsui.testing.IntentAsserts.assertTargetsComponent;
import static com.android.documentsui.util.FlagUtils.isUseMaterial3FlagEnabled;
import static com.android.documentsui.util.FlagUtils.isZipNgFlagEnabled;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -400,13 +401,17 @@ public class ActionHandlerTest {
    }

    @Test
    public void testDocumentPicked_InArchive_Unopenable() throws Exception {
    public void testDocumentPicked_InArchive_OpenableOrNot() throws Exception {
        mActivity.currentRoot = TestProvidersAccess.HOME;

        mHandler.openDocument(TestEnv.FILE_IN_ARCHIVE, ActionHandler.VIEW_TYPE_PREVIEW,
                ActionHandler.VIEW_TYPE_REGULAR);
        if (isZipNgFlagEnabled()) {
            mActivity.assertActivityStarted(Intent.ACTION_VIEW);
        } else {
            mDialogs.assertViewInArchivesShownUnsupported();
        }
    }

    @Test
    public void testDocumentPicked_PreviewsWhenResourceSet() throws Exception {