#include "gpu/ipc/service/gpu_channel_manager.h"
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include "base/test/test_trace_processor.h"
#include "base/test/trace_event_analyzer.h"
#include "base/test/trace_test_utils.h"
#include "base/unguessable_token.h"
#include "build/build_config.h"
#include "gpu/command_buffer/common/capabilities.h"
#include "gpu/command_buffer/common/context_result.h"
#include "gpu/command_buffer/service/memory_tracking.h"
#include "gpu/ipc/common/command_buffer_id.h"
#include "gpu/ipc/common/gpu_channel.mojom.h"
#include "gpu/ipc/service/gpu_channel.h"
#include "gpu/ipc/service/gpu_channel_test_common.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/perfetto/include/perfetto/tracing/tracing.h"
namespace gpu {
class GpuChannelManagerTest : public GpuChannelTestCommon { … };
TEST_F(GpuChannelManagerTest, EstablishChannel) { … }
#if BUILDFLAG(IS_ANDROID)
TEST_F(GpuChannelManagerTest, OnBackgroundedWithoutWebGL) {
TestApplicationBackgrounded(CONTEXT_TYPE_OPENGLES2, true);
}
TEST_F(GpuChannelManagerTest, OnBackgroundedWithWebGL) {
TestApplicationBackgrounded(CONTEXT_TYPE_WEBGL2, false);
}
#endif
TEST_F(GpuChannelManagerTest, GpuPeakMemoryOnlyReportedForValidSequence) { … }
TEST_F(GpuChannelManagerTest,
GpuPeakMemoryOnlyReportsPeaksFromObservationTime) { … }
TEST_F(GpuChannelManagerTest, GetPeakMemoryUsageCalculatedPerSequence) { … }
}