Closed Bug 1709792 Opened 3 years ago Closed 3 years ago

Har automation breaks on target switching

Categories

(DevTools :: Netmonitor, enhancement)

enhancement

Tracking

(Fission Milestone:M7a, firefox90 fixed)

RESOLVED FIXED
90 Branch
Fission Milestone M7a
Tracking Status
firefox90 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(3 files)

Har automation:

  1. store the first top level target web console front and use it for the whole lifecycle of the toolbox. It starts breaking on the first top level target switch as the first console front is destroyed.
  2. only listen to will-navigate and navigate, so never picks up the new top level target
  3. navigate is broken with JSWindowActor based targets (bug 1632141)

We should make this codebase rely on DOCUMENT_EVENT's dom-complete and avoid memoizing the console front (or use onTargetAvailable to update it).

Whiteboard: dt-fission-m3-triage
  • Stop memoizing web console front
  • track navigate via DOCUMENT_EVENT's dom-complete
  • workaround missed early will-navigate

These changes help fix browser_harautomation_simple.js

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Fission Milestone: --- → M8
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp

Make this codebase fully embrace commands and stop being target/toolbox oriented.

This introduces uncessary complexity and makes it uterly complex to wait
for HarAutomation's async initialization.
Its init isn't async yet.

Attachment #9221083 - Attachment description: Bug 1698891 - [devtools] Support target switching in har automation. → Bug 1709792 - [devtools] Support target switching in har automation.
Blocks: 1712586
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e955296ccb07
[devtools] Pass around commands in har automation. r=bomsy
https://hg.mozilla.org/integration/autoland/rev/74967859ddaf
[devtools] Remove har's toolbox overlay. r=bomsy
https://hg.mozilla.org/integration/autoland/rev/fac4711a3e2e
[devtools] Support target switching in har automation. r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Fission Milestone: M8 → M7a
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: