Reland "[dawn][emscripten][test] Add workaround for WASM tests startup."

This reverts commit 4a0c46b153c71a058820536bef5c5b9eb681f162.

Reason for revert: Re-reverting this because in google3, the version of chromium used for testing is currently 135.0.7049.52, but the version where the fix for this went in was 136.0.7085.0. We need to wait a bit longer before we can fully remove this workaround. (We are seeing flakes in the test again atm)

Bug: 404535888
Original change's description:
> Revert "[dawn][emscripten][test] Add workaround for WASM tests startup."
>
> This reverts commit 479c0326bd78e5069928c292d97dec22542749d7.
>
> Reason for revert: The Chromium change was reverted.
>
> Original change's description:
> > [dawn][emscripten][test] Add workaround for WASM tests startup.
> >
> > - In g3, we are seeing test flakes for the first WebGPU tests
> >   to run. This is likely a regression in Chromium, and we are
> >   investigating further. In the meantime, this workaround works
> >   locally in g3 to make the flake almost never happen since
> >   the issue is believed to be a race between the tests and
> >   Chromium startup.
> >
> > Bug: 404535888
> > No-Try: true
> > Change-Id: I9085bb3e6ce62d72f2759204306462484342529c
> > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/231678
> > Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> > Commit-Queue: Loko Kung <lokokung@google.com>
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: 404535888
> Fixed: 405952961
> Change-Id: Ia0dc415206c8103cb6d8d174b82cfa0903e2fe33
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/239475
> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
> Reviewed-by: Loko Kung <lokokung@google.com>
> Auto-Submit: Kai Ninomiya <kainino@chromium.org>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 404535888
Change-Id: I3b1c3db3b25944d7b2d636a946dd6e79feb22c9e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/240514
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: Loko Kung <lokokung@google.com>
diff --git a/src/emdawnwebgpu/tests/FuturesTests.cpp b/src/emdawnwebgpu/tests/FuturesTests.cpp
index aae545bd1..296ccea1 100644
--- a/src/emdawnwebgpu/tests/FuturesTests.cpp
+++ b/src/emdawnwebgpu/tests/FuturesTests.cpp
@@ -26,6 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include <dawn/webgpu_cpp_print.h>
+#include <emscripten.h>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 #include <webgpu/webgpu_cpp.h>
@@ -50,6 +51,14 @@
 
   protected:
     wgpu::Adapter RequestAdapter(const wgpu::RequestAdapterOptions* adapterOptions = nullptr) {
+        // TODO(crbug.com/404535888): Remove this sleep once we figure out regression.
+        static bool sSleepWorkaround = false;
+        if (!sSleepWorkaround) {
+            // Make the test sleep for an additional 2 seconds before trying to requestAdapter.
+            emscripten_sleep(2000);
+            sSleepWorkaround = true;
+        }
+
         wgpu::RequestAdapterStatus status;
         wgpu::Adapter result = nullptr;
         EXPECT_EQ(instance.WaitAny(