chromium/chrome/browser/ui/views/media_router/cast_dialog_view_unittest.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 "chrome/browser/ui/views/media_router/cast_dialog_view.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/media/router/discovery/access_code/access_code_cast_feature.h"
#include "chrome/browser/media/router/media_router_feature.h"
#include "chrome/browser/ui/media_router/cast_dialog_controller.h"
#include "chrome/browser/ui/media_router/cast_dialog_model.h"
#include "chrome/browser/ui/media_router/media_route_starter.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/controls/hover_button.h"
#include "chrome/browser/ui/views/media_router/cast_dialog_coordinator.h"
#include "chrome/browser/ui/views/media_router/cast_dialog_sink_view.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/media_router/browser/presentation/start_presentation_context.h"
#include "components/media_router/common/mojom/media_router.mojom.h"
#include "components/prefs/pref_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/events/base_event_utils.h"
#include "ui/views/bubble/bubble_border.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/test/button_test_api.h"
#include "ui/views/widget/widget.h"

_;
Invoke;
Mock;
NiceMock;
WithArg;

namespace media_router {

namespace {

UIMediaSink CreateAvailableSink() {}

UIMediaSink CreateConnectedSink() {}

UIMediaSink CreateFreezableSink() {}

UIMediaSink CreateFreezableFrozenSink() {}

CastDialogModel CreateModelWithSinks(std::vector<UIMediaSink> sinks) {}

ui::MouseEvent CreateMouseEvent() {}

}  // namespace

class MockCastDialogController : public CastDialogController {};

class CastDialogViewTest : public ChromeViewsTestBase {};

TEST_F(CastDialogViewTest, PopulateDialog) {}

TEST_F(CastDialogViewTest, StartCasting) {}

TEST_F(CastDialogViewTest, FreezeUiStartCasting) {}

TEST_F(CastDialogViewTest, StopCasting) {}

TEST_F(CastDialogViewTest, FreezeRoute) {}

TEST_F(CastDialogViewTest, FreezeNoRoute) {}

TEST_F(CastDialogViewTest, ClearIssue) {}

TEST_F(CastDialogViewTest, ShowSourcesMenu) {}

TEST_F(CastDialogViewTest, CastAlternativeSources) {}

TEST_F(CastDialogViewTest, DisableUnsupportedSinks) {}

TEST_F(CastDialogViewTest, ShowNoDeviceView) {}

TEST_F(CastDialogViewTest, SwitchToNoDeviceView) {}

TEST_F(CastDialogViewTest, ShowPermissionRejectedView) {}

TEST_F(CastDialogViewTest, ShowAccessCodeCastButtonDisabled) {}

TEST_F(CastDialogViewTest, ShowAccessCodeCastButtonEnabled) {}

// This test demonstrates that when the access code casting feature is
// available to the user, that the sources button is available even if no
// sinks are available.
TEST_F(CastDialogViewTest, AccessCodeEmptySinksSourcesAvailable) {}

}  // namespace media_router