chromium/chrome/browser/ui/views/global_media_controls/media_toolbar_button_contextual_menu_unittest.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_contextual_menu.h"

#include "base/test/scoped_feature_list.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/media/router/chrome_media_router_factory.h"
#include "chrome/browser/media/router/media_router_feature.h"
#include "chrome/browser/media/router/mojo/media_router_debugger_impl.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/menu_model_test.h"
#include "components/media_router/browser/test/mock_media_router.h"
#include "components/media_router/common/pref_names.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"

class MediaToolbarButtonContextualMenuTest : public MenuModelTest,
                                             public BrowserWithTestWindowTest {};

TEST_F(MediaToolbarButtonContextualMenuTest, ShowMenu) {}

// The kMediaRouterShowCastSessionsStartedByOtherDevices pref is not registered
// Android.
#if !BUILDFLAG(IS_ANDROID)
TEST_F(MediaToolbarButtonContextualMenuTest, ToggleOtherSessionsItem) {}
#endif

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
TEST_F(MediaToolbarButtonContextualMenuTest, ExecuteReportIssueCommand) {
  ExecuteReportIssueCommand();
  EXPECT_EQ(browser()->tab_strip_model()->GetWebContentsAt(0)->GetURL(),
            GURL("chrome://cast-feedback"));
}
#endif

TEST_F(MediaToolbarButtonContextualMenuTest,
       DisableOtherSessionsItemWhenPolicyIsTrue) {}

TEST_F(MediaToolbarButtonContextualMenuTest,
       DisableOtherSessionsItemWhenPolicyIsFalse) {}