#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/mock_callback.h"
#include "gpu/command_buffer/client/webgpu_interface_stub.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/navigator.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/modules/webgpu/gpu.h"
#include "third_party/blink/renderer/platform/graphics/gpu/dawn_control_client_holder.h"
#include "third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
namespace blink {
namespace {
class WebGPUContextProviderForTest
: public WebGraphicsContext3DProviderForTests { … };
class WebGPUContextLostTest : public testing::Test { … };
TEST_F(WebGPUContextLostTest, DestructedAfterLastRefDropped) { … }
TEST_F(WebGPUContextLostTest, GPULostContext) { … }
TEST_F(WebGPUContextLostTest, RecreatedAfterGPULostContext) { … }
TEST_F(WebGPUContextLostTest, ContextDestroyed) { … }
}
}