#include "components/performance_manager/graph/process_node_impl.h"
#include <optional>
#include "base/containers/contains.h"
#include "base/memory/raw_ptr.h"
#include "base/process/process.h"
#include "base/task/task_traits.h"
#include "base/test/bind.h"
#include "base/trace_event/named_trigger.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/public/render_process_host_id.h"
#include "components/performance_manager/public/render_process_host_proxy.h"
#include "components/performance_manager/test_support/graph_test_harness.h"
#include "components/performance_manager/test_support/mock_graphs.h"
#include "content/public/browser/background_tracing_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace performance_manager {
namespace {
class ProcessNodeImplTest : public GraphTestHarness { … };
}
TEST_F(ProcessNodeImplTest, SafeDowncast) { … }
ProcessNodeImplDeathTest;
TEST_F(ProcessNodeImplDeathTest, SafeDowncast) { … }
TEST_F(ProcessNodeImplTest, ProcessLifeCycle) { … }
namespace {
class LenientMockObserver : public ProcessNodeImpl::Observer { … };
MockObserver;
_;
Invoke;
InvokeWithoutArgs;
Return;
}
TEST_F(ProcessNodeImplTest, ObserverWorks) { … }
TEST_F(ProcessNodeImplTest, ConstructionArguments_Browser) { … }
TEST_F(ProcessNodeImplTest, ConstructionArguments_Renderer) { … }
TEST_F(ProcessNodeImplTest, ConstructionArguments_NonRenderer) { … }
TEST_F(ProcessNodeImplTest, PublicInterface) { … }
namespace {
class LenientFakeNamedTriggerManager
: public base::trace_event::NamedTriggerManager { … };
FakeBackgroundTracingManager;
}
TEST_F(ProcessNodeImplTest, FireBackgroundTracingTriggerOnUI) { … }
}