chromium/chrome/browser/ui/views/media_router/media_router_dialog_controller_views_interactive_uitest.cc

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

#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "build/build_config.h"
#include "chrome/browser/media/router/media_router_feature.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/top_container_view.h"
#include "chrome/browser/ui/views/global_media_controls/media_dialog_view.h"
#include "chrome/browser/ui/views/media_router/cast_dialog_coordinator.h"
#include "chrome/browser/ui/views/media_router/cast_dialog_view.h"
#include "chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/media_router/browser/media_router_metrics.h"
#include "components/media_router/browser/presentation/start_presentation_context.h"
#include "components/media_router/common/mojom/media_router.mojom.h"
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/page_transition_types.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/native_widget_private.h"
#include "ui/views/widget/widget.h"

#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
#include "chrome/browser/ui/views/global_media_controls/media_dialog_view.h"
#endif

WebContents;

namespace media_router {

std::unique_ptr<StartPresentationContext> CreateStartPresentationContext(
    content::WebContents* content) {}

class MediaRouterDialogControllerViewsTest : public InProcessBrowserTest {};

void MediaRouterDialogControllerViewsTest::CreateDialogController() {}

void MediaRouterDialogControllerViewsTest::OpenMediaRouterDialog() {}

void MediaRouterDialogControllerViewsTest::CloseWebContents() {}

// Create/Get a media router dialog for initiator.
IN_PROC_BROWSER_TEST_F(MediaRouterDialogControllerViewsTest,
                       OpenCloseMediaRouterDialog) {}

// TODO(crbug.com/40940401): Disabled flaky test.
// Regression test for crbug.com/1308341.
IN_PROC_BROWSER_TEST_F(MediaRouterDialogControllerViewsTest,
                       DISABLED_MediaBubbleClosedByPlatform) {}

// The feature |media_router::kGlobalMediaControlsCastStartStop| is supported
// on MAC, Linux and Windows only.
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
class GlobalMediaControlsDialogTest
    : public MediaRouterDialogControllerViewsTest {};

IN_PROC_BROWSER_TEST_F(GlobalMediaControlsDialogTest, OpenGMCDialog) {}

IN_PROC_BROWSER_TEST_F(GlobalMediaControlsDialogTest, OpenGMCDialogInWebApp) {}

IN_PROC_BROWSER_TEST_F(GlobalMediaControlsDialogTest,
                       ActivateInitiatorBeforeDialogOpen) {}

#endif

}  // namespace media_router