Re-import some test tweaks that were made as part of https://github.com/web-platform-tests/wpt/pull/34977, which upstreamed the test changes from https://bugs.webkit.org/show_bug.cgi?id=241048, to avoid the tests being flaky in Chrome.
Pull request: https://github.com/WebKit/WebKit/pull/2682
Test gardening commit 252761@main (fe8869a039c2): <https://commits.webkit.org/252761@main> Reviewed commits have been landed. Closing PR #2682 and removing active labels.
<rdar://problem/97499956>