Closed Bug 1721403 Opened 3 years ago Closed 3 years ago

browser_target_list_switchToTarget.js fails with server side target switching enabled

Categories

(DevTools :: Framework, defect)

defect

Tracking

(Fission Milestone:MVP, firefox92 fixed)

RESOLVED FIXED
92 Branch
Fission Milestone MVP
Tracking Status
firefox92 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(1 file)

$ ./mach mochitest --headless devtools/shared/commands/target/tests/browser_target_list_switchToTarget.js --setpref devtools.target-switching.server.enabled=true

This test fails because TabDescriptor.getTarget only works if a dedicated TargetCommand runs alongside.
Whereas this test only spawn a commands and TargetCommand for the first tab and not the second.

https://searchfox.org/mozilla-central/rev/79a3ae0b0fa6abeca2cb7cf220df293c8dec9207/devtools/client/fronts/descriptors/tab.js#228-240

Whiteboard: dt-fission-m3-triage

TabDescriptor.getTarget now only works if a TargetCommand is setup
and we called startListening on it.
And there is no way to retrieve another tab's target from
a given tab's TargetCommand/commands.

So here we should use two distinct commands.
Note that this test is covering cases we don't really support.
Switching between two distinct tab's top targets isn't something that should happen.
But I think it is still valuable to cover as it may later help us work on bug 1569859.

Fission Milestone: --- → MVP
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b88bef98c4c9 [devtools] Fix browser_target_list_switchToTarget.js with server side targets. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: