667317159's servedAnew reloads a magpie web page once another version
of magpie answers for it. Clicked back into on the Settings page, the
page reads /api/update twice, for the badge and for the Version row,
and each answer called location.reload(). When the second answer comes
a few ms after the first, Chromium starts the reload again and the page
is loaded twice. The whole GUI suite at 667317159 on the Linux box
caught it: update-served-anew's "en at 420" and "zh at 420" counted 3
loads (gui-full.log). servedAnew now reloads once per page.
The test answers the second post-update read 5 ms after the first, as a
busy machine does, and counts the loads after the page has settled.
app.js's comments on it are shorter, so app.js is 264 bytes smaller
than origin/main's; TestCoreScriptBudget is red on main already
(1534819 > 1533802, #5139) and stays red, 264 bytes less over.
Run (Linux box, magpie-desktop, through wsl-run, at e17b6cefc + this):
- node --test internal/gui/tests/update-served-anew.test.cjs three
times: 34/34 each (Chromium and WebKit, 5 languages, 1100 and 420).
- go test -tags nogui -run 'Budget|Script|Asset|I18n|Boot'
./internal/gui/: only TestCoreScriptBudget red, the same at
origin/main e17b6cefc alone (#5139).
Broken by hand: servedAnew calling location.reload() on every answer
again: the 10 Chromium "clicked back into" subtests red (3 loads).
WebKit passes either way; it doesn't start a second reload.
Not tried: the whole GUI suite again with this; mote (busy with other
sessions' suites).