#include "components/performance_manager/v8_memory/web_memory_aggregator.h"
#include <algorithm>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/trace_event/traced_value.h"
#include "components/performance_manager/graph/frame_node_impl.h"
#include "components/performance_manager/public/v8_memory/web_memory.h"
#include "components/performance_manager/v8_memory/v8_memory_test_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace performance_manager {
namespace v8_memory {
namespace {
AttributionScope;
struct ExpectedMemoryBreakdown { … };
mojom::WebMemoryMeasurementPtr CreateExpectedMemoryMeasurement(
const std::vector<ExpectedMemoryBreakdown>& breakdowns) { … }
mojom::WebMemoryMeasurementPtr NormalizeMeasurement(
const mojom::WebMemoryMeasurementPtr& measurement) { … }
}
class WebMemoryAggregatorTest : public WebMemoryTestHarness { … };
TEST_F(WebMemoryAggregatorTest, CreateBreakdownEntry) { … }
TEST_F(WebMemoryAggregatorTest, AggregateSingleFrame) { … }
TEST_F(WebMemoryAggregatorTest, AggregateSingleSiteMultiFrame) { … }
TEST_F(WebMemoryAggregatorTest, AggregateCrossOrigin) { … }
TEST_F(WebMemoryAggregatorTest, AggregateNestedCrossOrigin) { … }
TEST_F(WebMemoryAggregatorTest, AggregateSameOriginAboutBlank) { … }
TEST_F(WebMemoryAggregatorTest, SkipCrossOriginAboutBlank) { … }
TEST_F(WebMemoryAggregatorTest, AggregateWindowOpener) { … }
TEST_F(WebMemoryAggregatorTest, AggregateProvisionalWindowOpener) { … }
TEST_F(WebMemoryAggregatorTest, AggregateSameOriginWorker) { … }
TEST_F(WebMemoryAggregatorTest, AggregateCrossOriginWorker) { … }
TEST_F(WebMemoryAggregatorTest, AggregateCrossOriginCallers) { … }
TEST_F(WebMemoryAggregatorTest, AggregateCrossProcessCallers) { … }
TEST_F(WebMemoryAggregatorTest, BlinkMemory) { … }
TEST_F(WebMemoryAggregatorTest, BlinkMemoryWithoutFrameBytes) { … }
TEST_F(WebMemoryAggregatorTest, BlinkMemoryMultipleBrowsingInstances) { … }
TEST_F(WebMemoryAggregatorTest, WorkerWithoutData) { … }
TEST_F(WebMemoryAggregatorTest, CanvasMemory) { … }
}
}