Closed
Bug 1721379
Opened 3 years ago
Closed 3 years ago
browser_touch_device.js fails with server side target switching enabled
Categories
(DevTools :: Responsive Design Mode, defect)
DevTools
Responsive Design Mode
Tracking
(Fission Milestone:MVP, firefox92 fixed)
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: ochameau, Assigned: nchevobbe)
References
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file, 1 obsolete file)
$ ./mach mochitest --headless devtools/client/responsive/test/browser/browser_touch_device.js --setpref devtools.target-switching.server.enabled=true
There is many issues with this test.
- waitForViewportLoad may benefit from listening to DOCUMENT_EVENT dom-complete in order to better wait for all the updates. But I'm not longer sure it is important?
- BrowsingContextTargetActor.updateTargetConfiguration is being called when the related document has just started loading. But this method will try to reload the document in order to ensure applying the new configuration. This reload introduce infinite loop. When this method is called on document instantiation, we shouldn't need nor try to reload. The platform flags should be set early enough so that it has the right impact on the document to be loaded.
- We still call setMetaViewportOverride/clearMetaViewportOverride on each target. We end up calling these methods on already destroyed target. This introduce exception which make the test fail. We may benefit from moving this to target configuration. Otherwise we should at least avoid the exceptions.
- RDM ui.js tries to restore the actor state on each new target from here. We try to call some target actor on each new target and also call target configuration again. Calling target configuration isn't necessary. Target configuration itself should handle passing the data to the new target from the server side. So we should be able to remove that and only update the configuration when RDM opens, and later only when one particular config changes. I'm not sure that causes this test to fail, but I witness exceptions related to that.
Reporter | ||
Comment 1•3 years ago
|
||
- waitForViewportLoad may benefit from listening to dom-complete, but I'm no longer sure it is important? (old fix I had in my queue)
isDocumentCreation
is to avoid reloading from BrowsingContextTargetActor.updateTargetConfiguration, when we apply the setting whe the target get created from DOMWindowCreated. i.e. when the document just start loading, we don't need and should not reload!- setMetaViewportOverride and clearMetaViewportOverride are failing. We may call them on previous, already destroyed target... This should probably be migrated to become a target configuration.
- last but not least, but I'm not 100% sure it is mandatory. The restoreActorState/applyConfigurations change. We don't need to apply target configuration on each new target. The watcher should automatically reapply the config on the new top level target.
This seem to also fix browser_toolbox_rule_view_reload.js
Reporter | ||
Comment 2•3 years ago
|
||
See also bug 1721398 which faces similar issue, but instead of having trouble with target creation, it has issues with target destruction.
Assignee | ||
Updated•3 years ago
|
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•3 years ago
|
||
This makes browser_touch_device.js and browser_toolbox_rule_view_reload.js pass
with server side target switching enabled.
Depends on D120456
Updated•3 years ago
|
Fission Milestone: --- → MVP
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Updated•3 years ago
|
Attachment #9232155 -
Attachment is obsolete: true
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/759bc741488b
[devtools] Don't reload page when re-applying target configuration when the target just got created. r=ochameau.
Comment 5•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox92:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•