Closed Bug 1814440 Opened 1 year ago Closed 1 year ago

Await for debugger frontend processing of page reload in navigate and reload test helpers

Categories

(DevTools :: Debugger, task)

task

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1814607

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.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1814607
Resolution: --- → DUPLICATE

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

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 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.

Attachment #9316336 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: