Changes

Jump to: navigation, search

Project Fission/Enabling Tests with Fission

1,356 bytes added, 08:35, 13 September 2019
Added more tips
* To run a mochitest with Fission enabled, use '--fission-enabled' with 'mach test'.
* SpecialPowers.useRemoteSubframes can be used to check if Fission is enabled from a mochitest.
* [https://searchfox.org/mozilla-central/rev/ec806131cb7bcd1c26c254d25cd5ab8a61b2aeb6/testing/specialpowers/content/SpecialPowersAPI.jsm#1366 SpecialPowers.spawn()] is typically used when you have a cross-process iframe and you need to interact with it in some way that is not supported cross-process. In such a case, you one can use SpecialPowers.spawn() to send a script over to the process of the iframe to assert and/or return a value.* If a test complains that the remote type is “webIsolated=<some URI>”, but it expected “web”, then you can use E10SUtils.isWebRemoteType() instead to check the remote type (added in [https://bugzilla.mozilla.org/show_bug.cgi?id=1574543 bug 1574543]).* JavaScript error: resource://testing-common/content-task.js, line 66: NS_ERROR_NOT_INITIALIZED This means that the message manager has been torn down in the current content process. This can happen if you navigate to another process, then try to use test harness stuff in the original process.* Some XPConnect and bindings related tests check that cross-origin operations fail. With Fission, they will fail, but in a different way. These tests can be changed to use http://test1.mochi.test:8888/ (instead of, say, example.org) so that they will be cross-origin but still same-process even with Fission. See bug 1572895. It would probably be good to also check the cross-origin, out-of-process case.* JavaScript error: resource:///actors/PageStyleChild.jsm, line 35: SecurityError: Permission denied to access property "document" on cross-origin object This is just an error that always happens, so don’t worry about it if you see it in a specific test.* SpecialPowers push and pop for prefs have been fixed to work with Fission, but the equivalent methods for permissions have not been.
Confirm
30
edits

Navigation menu