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

Commit 70ff64b1 authored by Tony Huang's avatar Tony Huang
Browse files

Fix testShowInspector_DebugEnabled

This test only pass on userdebug rom previously.
We should manually set docsui DebugFlags in this test so it will not
failed on user rom.

Bug: 140299226
Test: atest DocumentsUIGoogleTests
Change-Id: I2ae98e2b3a9cd3a1869707e3a5b43eb4527b9146
parent 65bc46b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import com.android.documentsui.ModelId;
import com.android.documentsui.R;
import com.android.documentsui.TestActionModeAddons;
import com.android.documentsui.archives.ArchivesProvider;
import com.android.documentsui.base.DebugFlags;
import com.android.documentsui.base.DocumentInfo;
import com.android.documentsui.base.DocumentStack;
import com.android.documentsui.base.RootInfo;
@@ -642,12 +643,14 @@ public class ActionHandlerTest {
    @Test
    public void testShowInspector_DebugEnabled() throws Exception {
        mFeatures.debugSupport = true;
        DebugFlags.setDocumentDetailsEnabled(true);

        mHandler.showInspector(TestEnv.FILE_GIF);
        Intent intent = mActivity.startActivity.getLastValue();

        assertHasExtra(intent, Shared.EXTRA_SHOW_DEBUG);
        assertTrue(intent.getExtras().getBoolean(Shared.EXTRA_SHOW_DEBUG));
        DebugFlags.setDocumentDetailsEnabled(false);
    }

    @Test