diff --git a/src/dawn/tests/end2end/EventTests.cpp b/src/dawn/tests/end2end/EventTests.cpp
index ed8945a..83d8878 100644
--- a/src/dawn/tests/end2end/EventTests.cpp
+++ b/src/dawn/tests/end2end/EventTests.cpp
@@ -45,29 +45,30 @@
 wgpu::Device CreateExtraDevice(wgpu::Instance instance) {
     // IMPORTANT: DawnTest overrides RequestAdapter and RequestDevice and mixes
     // up the two instances. We use these to bypass the override.
-    auto* requestAdapter = reinterpret_cast<WGPUProcInstanceRequestAdapter>(
-        wgpu::GetProcAddress("wgpuInstanceRequestAdapter"));
-    auto* requestDevice = reinterpret_cast<WGPUProcAdapterRequestDevice>(
-        wgpu::GetProcAddress("wgpuAdapterRequestDevice"));
+    auto* requestAdapter = reinterpret_cast<WGPUProcInstanceRequestAdapter2>(
+        wgpu::GetProcAddress("wgpuInstanceRequestAdapter2"));
+    auto* requestDevice = reinterpret_cast<WGPUProcAdapterRequestDevice2>(
+        wgpu::GetProcAddress("wgpuAdapterRequestDevice2"));
 
     wgpu::Adapter adapter2;
-    requestAdapter(
-        instance.Get(), nullptr,
-        [](WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView, void* userdata) {
-            ASSERT_EQ(status, WGPURequestAdapterStatus_Success);
-            *reinterpret_cast<wgpu::Adapter*>(userdata) = wgpu::Adapter::Acquire(adapter);
-        },
-        &adapter2);
+    requestAdapter(instance.Get(), nullptr,
+                   {nullptr, WGPUCallbackMode_AllowSpontaneous,
+                    [](WGPURequestAdapterStatus status, WGPUAdapter adapter, WGPUStringView, void*,
+                       void* result) {
+                        *reinterpret_cast<wgpu::Adapter*>(result) = wgpu::Adapter::Acquire(adapter);
+                    },
+                    nullptr, &adapter2});
     DAWN_ASSERT(adapter2);
 
     wgpu::Device device2;
-    requestDevice(
-        adapter2.Get(), nullptr,
-        [](WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView, void* userdata) {
-            ASSERT_EQ(status, WGPURequestDeviceStatus_Success);
-            *reinterpret_cast<wgpu::Device*>(userdata) = wgpu::Device::Acquire(device);
-        },
-        &device2);
+    requestDevice(adapter2.Get(), nullptr,
+                  {nullptr, WGPUCallbackMode_AllowSpontaneous,
+                   [](WGPURequestDeviceStatus status, WGPUDevice device, WGPUStringView, void*,
+                      void* result) {
+                       ASSERT_EQ(status, WGPURequestDeviceStatus_Success);
+                       *reinterpret_cast<wgpu::Device*>(result) = wgpu::Device::Acquire(device);
+                   },
+                   nullptr, &device2});
     DAWN_ASSERT(device2);
 
     return device2;
