#include "components/performance_manager/performance_manager_registry_impl.h"
#include "base/memory/ptr_util.h"
#include "base/test/gtest_util.h"
#include "components/performance_manager/graph/process_node_impl.h"
#include "components/performance_manager/public/performance_manager_main_thread_mechanism.h"
#include "components/performance_manager/public/performance_manager_main_thread_observer.h"
#include "components/performance_manager/public/performance_manager_owned.h"
#include "components/performance_manager/public/performance_manager_registered.h"
#include "components/performance_manager/test_support/performance_manager_test_harness.h"
#include "components/performance_manager/test_support/run_in_graph.h"
#include "components/performance_manager/test_support/test_browser_child_process.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/common/process_type.h"
#include "content/public/test/mock_navigation_handle.h"
#include "content/public/test/test_navigation_throttle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace performance_manager {
namespace {
PerformanceManagerRegistryImplTest;
PerformanceManagerRegistryImplDeathTest;
class LenientMockObserver : public PerformanceManagerMainThreadObserver { … };
MockObserver;
class LenientMockMechanism : public PerformanceManagerMainThreadMechanism { … };
MockMechanism;
}
TEST_F(PerformanceManagerRegistryImplTest, ObserverWorks) { … }
TEST_F(PerformanceManagerRegistryImplTest,
MechanismCreateThrottlesForNavigation) { … }
namespace {
class LenientOwned : public PerformanceManagerOwned { … };
Owned;
}
TEST_F(PerformanceManagerRegistryImplTest, PerformanceManagerOwned) { … }
namespace {
class Foo : public PerformanceManagerRegisteredImpl<Foo> { … };
class Bar : public PerformanceManagerRegisteredImpl<Bar> { … };
}
TEST_F(PerformanceManagerRegistryImplTest, RegistrationWorks) { … }
TEST_F(PerformanceManagerRegistryImplDeathTest, BrowserProcessNode) { … }
TEST_F(PerformanceManagerRegistryImplDeathTest, BrowserChildProcessNodes) { … }
}