#ifndef COMPONENTS_PERFORMANCE_MANAGER_V8_MEMORY_V8_MEMORY_TEST_HELPERS_H_
#define COMPONENTS_PERFORMANCE_MANAGER_V8_MEMORY_V8_MEMORY_TEST_HELPERS_H_
#include <optional>
#include <string>
#include <vector>
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.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/public/v8_memory/v8_detailed_memory.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/v8_memory/v8_detailed_memory_decorator.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/mojom/performance_manager/v8_detailed_memory_reporter.mojom.h"
namespace content {
class RenderFrameHost;
}
namespace url {
class Origin;
}
namespace performance_manager {
class FrameNodeImpl;
class PageNodeImpl;
class ProcessNodeImpl;
namespace v8_memory {
class LenientMockV8DetailedMemoryReporter
: public blink::mojom::V8DetailedMemoryReporter { … };
MockV8DetailedMemoryReporter;
ExpectedMode;
class V8MemoryTestBase { … };
class V8MemoryPerformanceManagerTestHarness
: public PerformanceManagerTestHarness,
public V8MemoryTestBase { … };
class WebMemoryTestHarness : public GraphTestHarness { … };
blink::mojom::PerProcessV8MemoryUsagePtr NewPerProcessV8MemoryUsage(
size_t number_of_isolates);
void AddIsolateMemoryUsage(blink::ExecutionContextToken token,
uint64_t bytes_used,
blink::mojom::PerIsolateV8MemoryUsage* isolate);
void AddIsolateCanvasMemoryUsage(
blink::ExecutionContextToken token,
uint64_t bytes_used,
blink::mojom::PerIsolateV8MemoryUsage* isolate);
}
}
#endif