Await for debugger frontend processing of page reload in navigate and reload test helpers
Categories
(DevTools :: Debugger, task)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 obsolete file)
For now these two test helpers are not waiting for debugger's panel's reloaded
event.
This differs from other tools where we do that:
https://searchfox.org/mozilla-central/rev/d0cd6a42de9cbacd6d8f3253e2edc18076386282/devtools/client/shared/test/shared-head.js#773-792
This means that we may not wait for any async work being done by the debugger on page navigation/reload. This may introduce intermittent and RDP request pending at test end. Or unexpected mixup of async code during a test.
Unfortunately, this highlights an existing race condition related to inline scripts.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
We weren't waiting for "reloaded" event of the debugger and so potentialy resolving
before some async work completed during page navigation.
The main challenge here is that when the test pause the navigation,
navigate
and reload
test helpers will no longer resolve until the debugger resumes
execution.
I also had to tweak the DOCUMENT_EVENT support for WebExtension.
We still have to accept "frame switching" for WebExt (while keeping it off for the browser toolbox).
Otherwise the debugger doesn't update when reloading the addon or switching between addon documents.
Updated•1 year ago
|
Comment 3•1 year ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Comment 4•1 year ago
|
||
Comment on attachment 9316336 [details]
Bug 1814440 - [devtools] Wait for debugger frontend async work on navigation in all tests.
Revision D169074 was moved to bug 1814607. Setting attachment 9316336 [details] to obsolete.
Description
•