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•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 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
|
||
Comment 10•5 years ago
|
||
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
•