Closed Bug 1516957 Opened 2 years ago Closed 2 years ago

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


(Toolkit :: Preferences, enhancement, P1)




Tracking Status
firefox66 --- fixed


(Reporter: Paolo, Assigned: Paolo)


(Blocks 1 open bug)



(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
Part 1 - Remove uses of ContentTask from the new "about:config" tests. r=bgrins
Part 2 - Create a base test class and unify tab creation functions. r=bgrins
Part 3 - Share more test functions. r=bgrins
Part 4 - Share the search function. r=bgrins
You need to log in before you can comment on or make changes to this bug.