Bug 1823099 [wpt PR 39060] - De-flake two tests, a=testonly

Automatic update from web-platform-tests
De-flake two tests

These tests were timing out because window.screenX and window.screenY
were never set during the test run, leading to the code to wait 15
seconds before giving up trying to find them. But once it gave up,
it got the correct result, because there is no expected_screenX
or expected_screenY for these tests anyway.

Tests are:

external/wpt/html/browsers/the-window-object/open-close/open-features-non-integer-innerwidth.html
external/wpt/html/browsers/the-window-object/open-close/open-features-non-integer-width.html

Fixed: 1048149

Change-Id: I9e9620254b0e9284923e7a683213b1c0721ffc81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4347589
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1118959}

--

wpt-commits: cb19b01d65d9677bf53223322e32211c190eee5c
wpt-pr: 39060
This commit is contained in:
Chris Harrelson 2023-03-20 20:17:56 +00:00 коммит произвёл moz-wptsync-bot
Родитель 30550a7c5c
Коммит 8325e0f826
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -15,7 +15,8 @@ function sendCoordinates() {
// As a result, the window may not be positioned yet when the
// load event fires. To accommodate this, allow waiting up to
// 15 seconds for positioning to take place.
if (!window.screenX && !window.screenY && ++attempts < max) {
if ((!window.screenX && expected_screenX) &&
(!window.screenY && expected_screenY) && ++attempts < max) {
setTimeout(sendCoordinates, 100);
return;
}