PageData actor: Settle for readyState "interactive"

Some pages seemingly never become "complete". "interactive" (which we
already use in TranslationChild) is equivalent to DOMContentLoaded, and
that's enough for everything PageDataChild needs to do right now.

This should make Scaffold test runs more reliable. TranslatorTester uses
{ requireSuccessfulStatus: true }, which calls the PageData actor, and
that was occasionally flaking and causing the test to time out.

Fixes #4869
This commit is contained in:
Abe Jellinek 2024-11-26 10:16:49 -05:00
parent 501b7a9801
commit bb0d7ab951

View file

@ -81,7 +81,7 @@ class PageDataChild extends JSWindowActorChild {
const document = this.document;
function readyEnough() {
return document.readyState === "complete";
return document.readyState === "complete" || document.readyState === "interactive";
}
if (readyEnough()) {