chromium/chrome/browser/performance_manager/decorators/helpers/page_live_state_decorator_helper_unittest.cc

// Copyright 2019 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/performance_manager/decorators/helpers/page_live_state_decorator_helper.h"

#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
#include "chrome/browser/media/webrtc/media_stream_capture_indicator.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/performance_manager/embedder/performance_manager_registry.h"
#include "components/performance_manager/performance_manager_impl.h"
#include "components/performance_manager/public/decorators/page_live_state_decorator.h"
#include "components/performance_manager/test_support/decorators_utils.h"
#include "components/performance_manager/test_support/test_harness_helper.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h"

#if !BUILDFLAG(IS_ANDROID)
#include "chrome/test/base/browser_with_test_window_test.h"
#endif

namespace performance_manager {

namespace {

class PageLiveStateDecoratorHelperTest
    : public ChromeRenderViewHostTestHarness {};

void PageLiveStateDecoratorHelperTest::EndToEndStreamPropertyTest(
    blink::mojom::MediaStreamType stream_type,
    media::mojom::DisplayMediaInformationPtr display_media_info,
    bool (PageLiveStateDecorator::Data::*pm_getter)() const) {}

}  // namespace

TEST_F(PageLiveStateDecoratorHelperTest, OnIsCapturingVideoChanged) {}

TEST_F(PageLiveStateDecoratorHelperTest, OnIsCapturingAudioChanged) {}

TEST_F(PageLiveStateDecoratorHelperTest, OnIsBeingMirroredChanged) {}

TEST_F(PageLiveStateDecoratorHelperTest, OnIsCapturingWindowChanged) {}

TEST_F(PageLiveStateDecoratorHelperTest, OnIsCapturingDisplayChanged) {}

TEST_F(PageLiveStateDecoratorHelperTest, IsConnectedToBluetoothDevice) {}

TEST_F(PageLiveStateDecoratorHelperTest, IsConnectedToUsbDevice) {}

// Create many WebContents to exercice the code that maintains the linked list
// of PageLiveStateDecoratorHelper::WebContentsObservers.
TEST_F(PageLiveStateDecoratorHelperTest, ManyPageNodes) {}

#if !BUILDFLAG(IS_ANDROID)
// The behavior tested here isn't yet available on Android
class PageLiveStateDecoratorHelperTabsTest : public BrowserWithTestWindowTest {};

TEST_F(PageLiveStateDecoratorHelperTabsTest, IsActiveTab) {}

TEST_F(PageLiveStateDecoratorHelperTabsTest, IsPinnedTab) {}
#endif  // !BUILDFLAG(IS_ANDROID)

}  // namespace performance_manager