Closed Bug 1516957 Opened 9 months ago Closed 9 months ago

Remove uses of ContentTask from the new "about:config" tests

Categories

(Toolkit :: Preferences, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: Paolo, Assigned: Paolo)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

After discussing with Brian in bug 1510162, we've decided to remove the uses of ContentTask from the tests of the new "about:config" page, because the page will continue to be loaded in the parent process for the time being.

While the Fission project will separate content processes for each origin, giving the theoretical ability to differentiate the process type for privileged browser pages and regular web content, in the initial release of Fission all the content processes will be of the same type, and have access to the same cross-process APIs.

This means that if we implemented generic write access to preferences, processes running unprivileged pages would have the same access, increasing the attack surface that could allow an exploit to escape the sandbox.

Removing ContentTask usage will make it easier to refactor tests so that they share more code.
Uses of ContentTask can be removed because the page will continue to be loaded in the parent process for the time being. We don't want to give generic write access to preferences to the content processes until there is a way to separate privileged browser pages from regular web content using different process types.
This results in querying the document more often, but makes the test code more concise.

Depends on D15514
Depends on D15515
There is more refactoring that can be done in tests, for example creating more specific accessors for various button types, but I think we can work on it along with other bugs, instead of doing everything in advance here.
Pushed by paolo.mozmail@amadzone.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c762e770dec4
Part 1 - Remove uses of ContentTask from the new "about:config" tests. r=bgrins
https://hg.mozilla.org/integration/mozilla-inbound/rev/214d0e9f7825
Part 2 - Create a base test class and unify tab creation functions. r=bgrins
https://hg.mozilla.org/integration/mozilla-inbound/rev/dda920bc62dd
Part 3 - Share more test functions. r=bgrins
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1a87fe81d16
Part 4 - Share the search function. r=bgrins
You need to log in before you can comment on or make changes to this bug.