Closed Bug 1814607 Opened 2 years ago Closed 2 years ago

Wait for "reloaded" event in debugger tests on navigation/reload

Categories

(DevTools :: Debugger, task)

task

Tracking

(firefox112 fixed)

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

For now, the debugger test are using navigateTo test helper, but this isn't waiting for panel's reloaded event.
It means that if the debugger does anything during navigation, the tests won't be correctly waiting for the completion of this work.
This is a blocker for bug 1809168 as it starts doing late RDP request when the page is done loading. i.e. when DOCUMENT_EVENT dom-complete event is fired.

Unfortunately, doing this highlight issues with inline scripts.

Depends on: 1814608
Duplicate of this bug: 1814440

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.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Blocks: 1815791
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aff754cf0b3f [devtools] Wait for debugger frontend async work on navigation in all tests. r=devtools-reviewers,nchevobbe
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eacc394efd9f [devtools] Wait for debugger frontend async work on navigation in all tests. r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Flags: needinfo?(poirot.alex)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: