diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp index fd5b7006f6..80d2b9940f 100644 --- a/src/tests/DawnTest.cpp +++ b/src/tests/DawnTest.cpp @@ -892,7 +892,10 @@ void DawnTestBase::OnDeviceError(WGPUErrorType type, const char* message, void* } void DawnTestBase::OnDeviceLost(const char* message, void* userdata) { - FAIL() << "Device Lost during test: " << message; + // Using ADD_FAILURE + ASSERT instead of FAIL to prevent the current test from continuing with a + // corrupt state. + ADD_FAILURE() << "Device Lost during test: " << message; + ASSERT(false); } std::ostringstream& DawnTestBase::AddBufferExpectation(const char* file,