#include "components/performance_manager/v8_memory/v8_context_tracker_internal.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/test/gtest_util.h"
#include "components/performance_manager/public/execution_context/execution_context_registry.h"
#include "components/performance_manager/public/mojom/v8_contexts.mojom.h"
#include "components/performance_manager/test_support/graph_test_harness.h"
#include "components/performance_manager/test_support/mock_graphs.h"
#include "components/performance_manager/v8_memory/v8_context_tracker.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/tokens/tokens.h"
namespace performance_manager {
namespace v8_memory {
namespace internal {
namespace {
const char kExtensionId[] = …;
class V8ContextTrackerInternalTest : public GraphTestHarness { … };
mojom::V8ContextDescription MakeMatchingV8ContextDescription(
ExecutionContextData* ec_data,
bool main_world = true) { … }
V8ContextTrackerInternalDeathTest;
}
TEST_F(V8ContextTrackerInternalDeathTest,
PassingUnreferencedExecutionContextDataFails) { … }
TEST_F(V8ContextTrackerInternalDeathTest,
MultipleMainWorldsForExecutionContextFails) { … }
TEST_F(V8ContextTrackerInternalDeathTest, CrossProcessV8ContextDataExplodes) { … }
TEST_F(V8ContextTrackerInternalTest, ExecutionContextDataShouldDestroy) { … }
TEST_F(V8ContextTrackerInternalTest,
ExecutionContextDataTornDownByRemoteFrameData) { … }
TEST_F(V8ContextTrackerInternalTest,
ExecutionContextDataTornDownByV8ContextData) { … }
TEST_F(V8ContextTrackerInternalTest, ContextCounts) { … }
namespace {
class V8ContextTrackerInternalTearDownOrderTest
: public V8ContextTrackerInternalTest { … };
}
TEST_F(V8ContextTrackerInternalTearDownOrderTest, RemoteBeforeLocal) { … }
TEST_F(V8ContextTrackerInternalTearDownOrderTest, LocalBeforeRemote) { … }
}
}
}