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

Commit 6fdb0850 authored by Erfan Norozi's avatar Erfan Norozi
Browse files

Fix broken context menu test in ActionHandler.

When running a user build with a phone target, proguard strips
openDocumentViewOnly which causes the test to fail.

Requiring the desktop handling flag means openDocumentViewOnly is
reachable by production code and therefore proguard won't strip it.

Bug: 393958917
Flag: EXEMPT Fixing a test
Test: Fixing a test

Change-Id: I45598949661e78ef3e474045637b0d1fe5ff683a
parent 41256da5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -460,7 +460,10 @@ public class ActionHandlerTest {
        assertEquals(false, result);
    }

    // Require desktop file handling flag because when it's disabled proguard strips the
    // openDocumentViewOnly function because it's not used anywhere reachable by production code.
    @Test
    @RequiresFlagsEnabled({Flags.FLAG_DESKTOP_FILE_HANDLING})
    public void testDocumentContextMenuOpen() throws Exception {
        mActivity.resources.setQuickViewerPackage("corptropolis.viewer");
        mActivity.currentRoot = TestProvidersAccess.HOME;