Support ContentTask over JS Window Actors for testing
Categories
(Core :: IPC, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: nika, Assigned: kmag)
References
Details
Attachments
(5 files, 1 obsolete file)
ContentTask is pretty handy for running code in content processes for tests. Unfortunately, it doesn't provide an easy mechanism for sending messages into out-of-process subframes, or to specific processes with Window Globals.
It would be nice to make ContentTask more generic and capable of being sent over JS Window Actors.
I think this could be especially useful for writing tests to be fission compatible.
I imagine this could be possible by making a specific JS Window Actor which handles running the scripts, similar to the existing implementation, and then using some common logic to pick a BrowsingContext based on the object passed in (e.g. subframe for browser, iframe, frameloader. specific for a WindowGlobalParent), sending a message to the parent process (if not already in it), and then bouncing the message back into the correct content process.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
With out-of-process iframes, we'll need similar functionality to the
ContentTask helpers that can be used in any process, with any type of frame.
Using ContentTask directly in unprivileged contexts will, I think, be a bit
too combersome given how often it's needed, so this patch adds an API directly
to SpecialPowers instead.
The environment provided to the task is currently pretty basic, and doesn't
provide the assertion helpers currently available to ContentTask tasks, but it
can grow as we find it necessary.
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Updated•5 years ago
|
Reporter | ||
Comment 7•5 years ago
|
||
ni? :mccr8 - noticed that Part 4 here adds a helper similar to the sort of thing we'd be doing in bug 1559478. Might be cleaner to implement it that way, but the getter is also an option.
Comment 8•5 years ago
|
||
Ok, thanks. I'll take a look when I get around to bug 1559478.
Assignee | ||
Comment 9•5 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1471732eca80f6fa44ae50b39c0317965cd29671 Bug 1532795: Part 1 - Support sending BrowsingContexts via structured clone. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/8a3d311c7fac75b5902f2fa9dc651137a499fc18 Bug 1532795: Part 2 - Implement basic SpecialPowers.spawn as a replacement for ContentTask. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/fbbe113aeef2f44741248ef15be66562e66adf6c Bug 1532795: Part 3 - Update random test to use SpecialPowers.spawn for cross-process iframe access. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/119caddcb0660754f9bce5e7153bfc92dc211d57 Bug 1532795: Part 4 - Add helper to get BrowsingContext from WindowProxy. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/d5415970da5fd83eb870b397b8db7fdf6c57ad23 Bug 1532795: Part 5 - Support SpecialPowers.spawn on WindowProxy objects. r=nika
Comment 10•5 years ago
|
||
Pushed by maglione.k@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cf359a8ec753 Part 1 - Support sending BrowsingContexts via structured clone. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/c873f0eb94be Part 2 - Implement basic SpecialPowers.spawn as a replacement for ContentTask. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/a7f093fbef06 Part 3 - Update random test to use SpecialPowers.spawn for cross-process iframe access. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/23e90c6fec2b Part 4 - Add helper to get BrowsingContext from WindowProxy. r=nika https://hg.mozilla.org/integration/mozilla-inbound/rev/3fe4d4942fd2 Part 5 - Support SpecialPowers.spawn on WindowProxy objects. r=nika
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cf359a8ec753
https://hg.mozilla.org/mozilla-central/rev/c873f0eb94be
https://hg.mozilla.org/mozilla-central/rev/a7f093fbef06
https://hg.mozilla.org/mozilla-central/rev/23e90c6fec2b
https://hg.mozilla.org/mozilla-central/rev/3fe4d4942fd2
Comment 12•5 years ago
|
||
Backed out 34 changesets (bug 1561150, bug 1541557, bug 1561724, bug 1561999, bug 1558298, bug 1561061, bug 1532795, bug 1560400, bug 1561122) for beta simulation failures (bug 1563905, bug 1564001):
https://hg.mozilla.org/mozilla-central/rev/7e6657f88b7694ecd841088963ff71d767e4ec22
Comment 13•5 years ago
|
||
Relanded (backout got backed out):
https://hg.mozilla.org/mozilla-central/rev/e596664275d5e3e2fdcb7fa8d1447289f99269c3
Description
•