Fix some uses of http:// WebChannels in tests
Categories
(Toolkit :: General, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox132 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
I have patches for the tests in devtools/client/performance-new/test/browser/, browser_fxa_web_channel.js, browser_remoteTroubleshoot.js to make them not use http:// URIs for WebChannels.
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
This is a test of the remote trouble shooting API, which uses a
permission-based WebChannel to allow a website to request about:support
information. The test uses the WebChannelMessageToContent feature of
WebChannels to initiate a request for support information in the webpage,
which then gets the information from the parent and sends it back for
checking.
Before this patch, the information was sent back via a new WebChannel,
test-remote-troubleshooting-backchannel, which has access based on a
principal rather than a permission. This is a problem because the final
subtest checks that the trouble shooting request won't work on an http
webpage, so if we want to block principal-based WebChannels on http
sites as well as permission-based WebChannels, then we won't be able
to report the result.
Therefore, this patch replaces the WebChannel-based backchannel with
a more conventional SpecialPowers.spawn()-based result retrieval. The
web page requests the information, sticks it on a global variable
(behind a promise that waits for the result) and then the parent
process uses SpecialPowers.spawn() to pass it back to the parent.
Before the landing of bug 1275612, there was an additional subtest
that was checking certain properties of the backchannel itself,
so it had to be a WebChannel, but that is removed so now it doesn't
matter how it is implemented.
| Assignee | ||
Comment 4•1 year ago
|
||
Part 3 removes a test-only child-to-parent message with a complex type.
https://hg.mozilla.org/mozilla-central/rev/26b05a4d9c6d
https://hg.mozilla.org/mozilla-central/rev/39853bf21dd5
https://hg.mozilla.org/mozilla-central/rev/d815712a07a5
Description
•