@Test
    @Ignore("Test is flaky and we're removing Browser Actions.")
    public void testBrowserActionsFallbackMenuShownCorrectly() throws InterruptedException {
        final CountDownLatch signal = new CountDownLatch(1);
        final BrowserActionsFallbackMenuUi.BrowserActionsFallMenuUiListener listener =
                new BrowserActionsFallbackMenuUi.BrowserActionsFallMenuUiListener() {
                    @Override
                    public void onMenuShown(View contentView) {
                        signal.countDown();
                        assertDialogInflatedCorrectly(contentView);
                    }
                };
        mActivityTestRule.getActivity().runOnUiThread(new Runnable() {
            @Override
            public void run() {
                BrowserActionsFallbackMenuUi menuUi =
                        new BrowserActionsFallbackMenuUi(mContext, Uri.parse(TEST_URL), mMenuItems);
                menuUi.setMenuUiListener(listener);
                menuUi.displayMenu();
            }
        });
        signal.await(5L, TimeUnit.SECONDS);
    }
Test whether {@link BrowserActionsFallbackMenuUi} is inflated correctly.
customtabs/tests/src/android/support/customtabs/browseractions/BrowserActionsFallbackMenuUiTest.java