browser_styleeditor_loading.js fails with server side target switching enabled
Categories
(DevTools :: Framework, defect)
Tracking
(Fission Milestone:MVP, firefox93 fixed)
Tracking | Status | |
---|---|---|
firefox93 | --- | fixed |
People
(Reporter: ochameau, Assigned: nchevobbe)
References
Details
(Whiteboard: dt-fission-m3-mvp)
Attachments
(1 file, 1 obsolete file)
This test fails because we try to attach to an initial about:blank document.
The test opens a toolbox on a still loading tab:
https://searchfox.org/mozilla-central/rev/2022d34edd5817948b27f093cd203ae6adb18a25/devtools/client/styleeditor/test/browser_styleeditor_loading.js#10-16
which ends up making the watcher throw when calling this:
https://searchfox.org/mozilla-central/rev/2022d34edd5817948b27f093cd203ae6adb18a25/devtools/server/actors/watcher/target-helpers/frame-helper.js#129-136
This will emit a JSWindow Actor query which will fail and reject because the document we try to communicate with is the initial about:blank document of the tab.
This document, and its WindowGlobal, alongside its JSWindow Actor pair, will be almost immediately destroyed!
We should probably ignore this document from the parent process, as we do in the content process:
https://searchfox.org/mozilla-central/rev/2022d34edd5817948b27f093cd203ae6adb18a25/devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm#45-63
The issue here is that's the first top level document/target and we ought to emit it while calling watcherActor.watchTarget("frame")
, so that the first top target is fetched when calling targetCommand.startListening()
. So we would need to ignore the document, while waiting for the next one.
Reporter | ||
Comment 1•3 years ago
|
||
Avoid attaching the the initial and transient about:blank documents
as the query to instantiate the target in the content process will
most likely fail as this document is almost immediately destroyed.
The only required change to fix browser_styleeditor_loading.js is the change
made to frame-helper.js
Reporter | ||
Comment 2•3 years ago
|
||
Note that the test fails intermitently locally, I reproduce with --run-until-failure.
Assignee | ||
Comment 3•3 years ago
|
||
I can't get the test to fail on latest Nightly, maybe some changes landed that got rid of this?
Updated•3 years ago
|
Reporter | ||
Comment 4•3 years ago
|
||
I still reproduce this failure:
./mach mochitest --setpref devtools.target-switching.server.enabled=true --headless browser_styleeditor_loading.js
It even looks more permanent than before?
It fails with the following error:
0:04.83 TEST_START: devtools/client/styleeditor/test/browser_styleeditor_loading.js
0:04.94 INFO Entering test bound
0:04.94 INFO Adding a new tab with URL: 'http://example.com/browser/devtools/client/styleeditor/test/longload.html'
0:05.08 INFO Console message: [JavaScript Error: "NotFoundError: No such JSWindowActor 'MarionetteEvents'"]
0:05.23 GECKO(58984) console.warn: "Failed to create DevTools Frame target for browsingContext" 48
0:05.23 GECKO(58984) console.warn: (new AbortError("Actor 'DevToolsFrame' destroyed before query 'DevToolsFrameParent:instantiate-already-available' was resolved", (void 0)))
0:05.29 GECKO(58984) console.warn: "Failed to add watcher data entry for frame targets in browsing context" 48
0:05.29 GECKO(58984) console.warn: (new Error("No target actor for this Watcher Actor ID:\"server0.conn0.watcher2\" / BrowserId:13", "resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm", 506))
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
This makes browser_styleeditor_loading to pass with server side target switching.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•