DevTools: Fix a potentially flaky test
Awaiting onceAttachedToTarget() directly after the evaluate() call which creates the new worker is not safe. The event could be fired after the `await evaluate()` is finished but before the AttachedToTarget handler is registered. Listening for the attached event before triggering the creation of the worker is the only safe way to do this. Change-Id: I2e9374d42da5a98b18f3c643b9259818620bb2b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940245 Auto-Submit: Peter Marshall <petermarshall@chromium.org> Reviewed-by:Mathias Bynens <mathias@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#719920}
Showing
Please register or sign in to comment