Bug 1816697 - Change test annotations for tests that fail/only succeed with session-history-in-parent. r=smaug

Some of the tests that fail (or only succeed) with SHIP are currently marked for
Fission. This makes them fail once we turn on SHIP without Fission.

Differential Revision: https://phabricator.services.mozilla.com/D169824
This commit is contained in:
Peter Van der Beken
2023-02-21 14:58:35 +00:00
parent 2c0fccca00
commit 6df2b51cf5
13 changed files with 26 additions and 24 deletions

View File

@@ -58,7 +58,7 @@ const known_scripts = {
]),
};
if (!gFissionBrowser) {
if (!Services.appinfo.sessionHistoryInParent) {
known_scripts.modules.add(
"resource:///modules/sessionstore/ContentSessionStore.sys.mjs"
);

View File

@@ -105,7 +105,7 @@ async function openURIInPrivateTab(uri) {
);
if (
SpecialPowers.Services.prefs.getBoolPref("fission.bfcacheInParent") &&
SpecialPowers.Services.appinfo.sessionHistoryInParent &&
currRemoteType == prevRemoteType &&
uri == "about:blank"
) {

View File

@@ -344,7 +344,7 @@ tags = openUILinkIn
skip-if =
os == "win" && os_version == "6.1" # Skip on Azure - frequent failure
[browser_send_async_message_oom.js]
skip-if = fission # Tests that the frame script OOMs, which is unused in Fission.
skip-if = sessionHistoryInParent # Tests that the frame script OOMs, which is unused when SHIP is enabled.
[browser_sessionStoreContainer.js]
[browser_windowStateContainer.js]
[browser_1234021.js]

View File

@@ -28,20 +28,20 @@ add_task(async function() {
await loaded;
const firstPageBrowsingContext = browser.browsingContext;
const isFissionAndBfcacheInParentEnabled =
SpecialPowers.useRemoteSubframes &&
const isBfcacheInParentEnabled =
SpecialPowers.Services.appinfo.sessionHistoryInParent &&
SpecialPowers.Services.prefs.getBoolPref("fission.bfcacheInParent");
if (isFissionAndBfcacheInParentEnabled) {
if (isBfcacheInParentEnabled) {
isnot(
aboutBlankBrowsingContext,
firstPageBrowsingContext,
"With fission and bfcache in parent, navigations spawn a new BrowsingContext"
"With bfcache in parent, navigations spawn a new BrowsingContext"
);
} else {
is(
aboutBlankBrowsingContext,
firstPageBrowsingContext,
"Without fission or bfcache in parent, navigations reuse the same BrowsingContext"
"Without bfcache in parent, navigations reuse the same BrowsingContext"
);
}
@@ -113,17 +113,17 @@ add_task(async function() {
await loaded;
const secondPageBrowsingContext = browser.browsingContext;
if (isFissionAndBfcacheInParentEnabled) {
if (isBfcacheInParentEnabled) {
isnot(
firstPageBrowsingContext,
secondPageBrowsingContext,
"With fission and bfcache in parent, navigations spawn a new BrowsingContext"
"With bfcache in parent, navigations spawn a new BrowsingContext"
);
} else {
is(
firstPageBrowsingContext,
secondPageBrowsingContext,
"Without fission or bfcache in parent, navigations reuse the same BrowsingContext"
"Without bfcache in parent, navigations reuse the same BrowsingContext"
);
}
{

View File

@@ -97,7 +97,7 @@ support-files = file_beforeunload_and_bfcache.html
support-files = file_bug1583110.html
[test_bug1706090.html]
support-files = file_bug1706090.html
skip-if = fission # The test is currently for the old bfcache implementation
skip-if = sessionHistoryInParent # The test is currently for the old bfcache implementation
[test_bug1745638.html]
support-files = file_bug1745638.html
[test_bug1747019.html]

View File

@@ -98,7 +98,7 @@ const blockBFCacheTests = [
},
];
if (SpecialPowers.Services.appinfo.sessionHistoryInParent) {
if (SpecialPowers.Services.appinfo.fission) {
blockBFCacheTests.push({
name: "Loading OOP iframe",
test: () => {

View File

@@ -14,7 +14,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1364364
let testWin, testDoc;
async function test() {
SimpleTest.waitForExplicitFinish();
if (SpecialPowers.Services.appinfo.fissionAutostart) {
if (SpecialPowers.Services.appinfo.sessionHistoryInParent) {
// This test relies on the possibility to modify the bfcached document.
// The new implementation is more restricted and thus works only
// when the bfcached browsing context is the only top level one

View File

@@ -3194,10 +3194,8 @@ toolbar#nav-bar {
# Currently for automation, the pref defaults to true (but can be
# overridden with --setpref).
"serviceworker_e10s": True,
"sessionHistoryInParent": self.extraPrefs.get(
"fission.sessionHistoryInParent", False
)
or self.extraPrefs.get("fission.autostart", True),
"sessionHistoryInParent": not options.disable_fission
or self.extraPrefs.get("fission.sessionHistoryInParent", False),
"socketprocess_e10s": self.extraPrefs.get(
"network.process.enabled", False
),

View File

@@ -51,6 +51,7 @@ export var newAppInfo = function(options = {}) {
uniqueProcessID: origRuntime.uniqueProcessID,
fissionAutostart: origRuntime.fissionAutostart,
sessionHistoryInParent: origRuntime.sessionHistoryInParent,
browserTabsRemoteAutostart: origRuntime.browserTabsRemoteAutostart,
get maxWebProcessCount() {
return origRuntime.maxWebProcessCount;

View File

@@ -1543,6 +1543,9 @@ class XPCShellTests(object):
self.mozInfo = fixedInfo
self.mozInfo["fission"] = prefs.get("fission.autostart", True)
self.mozInfo["sessionHistoryInParent"] = self.mozInfo["fission"] or prefs.get(
"fission.sessionHistoryInParent", False
)
self.mozInfo["serviceworker_e10s"] = True

View File

@@ -169,7 +169,7 @@ add_task(async function test_extension_page_sameprocess_navigation() {
});
if (
Services.appinfo.fissionAutostart &&
Services.appinfo.sessionHistoryInParent &&
WebExtensionPolicy.isExtensionProcess
) {
// When the extension are running in the main process while the webpages run
@@ -294,8 +294,8 @@ add_task(async function test_extension_page_context_navigated_to_web_page() {
// https://searchfox.org/mozilla-central/rev/24c1cdc33ccce692612276cd0d3e9a44f6c22fd3/dom/base/nsFrameLoaderOwner.cpp#185-196
// ).
equal(active, undefined, "extension page context should not exist anymore");
} else if (Services.appinfo.fissionAutostart) {
// When fission is enabled and the extensions runs in their own child extension
} else if (Services.appinfo.sessionHistoryInParent) {
// When SHIP is enabled and the extensions runs in their own child extension
// process, the BFCache is managed entirely from the parent process and the
// extension page is expected to be able to enter the BFCache.
equal(

View File

@@ -85,12 +85,12 @@ skip-if =
skip-if =
tsan # Bug 1683730
apple_silicon # Disabled due to bleedover with other tests when run in regular suites; passes in "failures" jobs
fission # Bug 1762638
sessionHistoryInParent # Bug 1762638
[test_ext_contentscript_context_isolation.js]
skip-if =
tsan # Bug 1683730
apple_silicon # Disabled due to bleedover with other tests when run in regular suites; passes in "failures" jobs
fission # Bug 1762638
sessionHistoryInParent # Bug 1762638
[test_ext_contentscript_create_iframe.js]
[test_ext_contentscript_csp.js]
run-sequentially = very high failure rate in parallel

View File

@@ -63,7 +63,7 @@ skip-if = ccov && os == 'linux' # bug 1607581
skip-if =
apple_silicon # Disabled due to bleedover with other tests when run in regular suites; passes in "failures" jobs
os == "linux" && socketprocess_networking && !fission && debug # Bug 1759035
fission # Bug 1762638
sessionHistoryInParent # Bug 1762638
[test_ext_web_accessible_resources_matches.js]
skip-if =
os == "linux" && socketprocess_networking && !fission && debug # Bug 1759035