chromium/components/performance_manager/decorators/page_live_state_decorator_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 "components/performance_manager/public/decorators/page_live_state_decorator.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "components/performance_manager/graph/page_node_impl.h"
#include "components/performance_manager/public/performance_manager.h"
#include "components/performance_manager/test_support/decorators_utils.h"
#include "components/performance_manager/test_support/graph_test_harness.h"
#include "components/performance_manager/test_support/performance_manager_test_harness.h"
#include "components/performance_manager/test_support/run_in_graph.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/accessibility/ax_mode.h"

namespace performance_manager {

namespace {

// A test version of a PageLiveStateObserver that records the latest function
// that has been called. Gmock isn't used here as instances of this class will
// be used on a different sequence than the main one and that this add a lot of
// extra complexity.
class TestPageLiveStateObserver : public PageLiveStateObserver {};

}  // namespace

class PageLiveStateDecoratorTest : public PerformanceManagerTestHarness {};

TEST_F(PageLiveStateDecoratorTest, OnIsConnectedToUSBDeviceChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsConnectedToBluetoothDeviceChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsCapturingVideoChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsCapturingAudioChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsBeingMirroredChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsCapturingWindowChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsCapturingDisplayChanged) {}

TEST_F(PageLiveStateDecoratorTest, SetIsAutoDiscardable) {}

TEST_F(PageLiveStateDecoratorTest, OnWasDiscardedChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsActiveTabChanged) {}

TEST_F(PageLiveStateDecoratorTest, OnIsPinnedTabChanged) {}

// DevTools not supported on Android.
#if !BUILDFLAG(IS_ANDROID)
TEST_F(PageLiveStateDecoratorTest, OnIsDevToolsOpenChanged) {}

#endif  // !BUILDFLAG(IS_ANDROID)

TEST_F(PageLiveStateDecoratorTest, OnAccessibilityModeChanged) {}

TEST_F(PageLiveStateDecoratorTest, UpdateTitleInBackground) {}

TEST_F(PageLiveStateDecoratorTest, UpdateFaviconInBackground) {}

}  // namespace performance_manager