#include "gpu/command_buffer/tests/webgpu_test.h"
#include <dawn/dawn_proc.h>
#include <dawn/dawn_thread_dispatch_proc.h>
#include "base/command_line.h"
#include "base/test/bind.h"
#include "base/test/test_simple_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "components/viz/test/test_gpu_service_holder.h"
#include "gpu/command_buffer/client/webgpu_cmd_helper.h"
#include "gpu/command_buffer/client/webgpu_implementation.h"
#include "gpu/command_buffer/service/service_utils.h"
#include "gpu/command_buffer/service/webgpu_decoder.h"
#include "gpu/config/gpu_test_config.h"
#include "gpu/ipc/in_process_command_buffer.h"
#include "gpu/ipc/webgpu_in_process_context.h"
#include "gpu/webgpu/callback.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gpu {
namespace {
void CountCallback(int* count) { … }
}
#define SKIP_TEST_IF(condition) …
WebGPUTest::Options::Options() = default;
std::map<std::pair<WGPUDevice, wgpu::ErrorType>, bool>
WebGPUTest::s_expected_errors = …;
WebGPUTest::WebGPUTest() = default;
WebGPUTest::~WebGPUTest() = default;
bool WebGPUTest::WebGPUSupported() const { … }
bool WebGPUTest::WebGPUSharedImageSupported() const { … }
void WebGPUTest::SetUp() { … }
void WebGPUTest::TearDown() { … }
void WebGPUTest::Initialize(const Options& options) { … }
webgpu::WebGPUInterface* WebGPUTest::webgpu() const { … }
webgpu::WebGPUImplementation* WebGPUTest::webgpu_impl() const { … }
webgpu::WebGPUCmdHelper* WebGPUTest::webgpu_cmds() const { … }
SharedImageInterface* WebGPUTest::GetSharedImageInterface() const { … }
webgpu::WebGPUDecoder* WebGPUTest::GetDecoder() const { … }
void WebGPUTest::RunPendingTasks() { … }
void WebGPUTest::WaitForCompletion(wgpu::Device device) { … }
void WebGPUTest::PollUntilIdle() { … }
wgpu::Device WebGPUTest::GetNewDevice() { … }
TEST_F(WebGPUTest, FlushNoCommands) { … }
TEST_F(WebGPUTest, ReportLoss) { … }
TEST_F(WebGPUTest, ReportLossReentrant) { … }
TEST_F(WebGPUTest, RequestAdapterAfterContextLost) { … }
TEST_F(WebGPUTest, RequestDeviceAfterContextLost) { … }
TEST_F(WebGPUTest, RequestDeviceWithUnsupportedFeature) { … }
TEST_F(WebGPUTest, SPIRVIsDisallowed) { … }
TEST_F(WebGPUTest, ExplicitFallbackAdapterIsDisallowed) { … }
TEST_F(WebGPUTest, ImplicitFallbackAdapterIsDisallowed) { … }
TEST_F(WebGPUTest, CompatibilityMode) { … }
TEST_F(WebGPUTest, NonCompatibilityMode) { … }
}