зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1737085 - Mac browser_TabUnloader.js Nightly as Beta test failure r=spohl
Test-only fix: pref-on tab unloading and memory-pressure notifications when the test is run on beta or release. Tab unloading and memory pressure notifications are limited to Nightly at this time. Differential Revision: https://phabricator.services.mozilla.com/D129665
This commit is contained in:
Родитель
14a5425d27
Коммит
1f882ebd64
|
@ -128,12 +128,25 @@ const PREF_AUDIO_LOOPBACK = "media.audio_loopback_dev";
|
|||
const PREF_VIDEO_LOOPBACK = "media.video_loopback_dev";
|
||||
const PREF_FAKE_STREAMS = "media.navigator.streams.fake";
|
||||
const PREF_ENABLE_UNLOADER = "browser.tabs.unloadOnLowMemory";
|
||||
const PREF_MAC_LOW_MEM_RESPONSE = "browser.lowMemoryResponseMask";
|
||||
|
||||
add_task(async function test() {
|
||||
registerCleanupFunction(() => {
|
||||
Services.prefs.clearUserPref(PREF_ENABLE_UNLOADER);
|
||||
if (AppConstants.platform == "macosx") {
|
||||
Services.prefs.clearUserPref(PREF_MAC_LOW_MEM_RESPONSE);
|
||||
}
|
||||
});
|
||||
Services.prefs.setBoolPref(PREF_ENABLE_UNLOADER, true);
|
||||
|
||||
// On Mac, tab unloading and memory pressure notifications are limited
|
||||
// to Nightly so force them on for this test for non-Nightly builds. i.e.,
|
||||
// tests on Release and Beta builds. Mac tab unloading and memory pressure
|
||||
// notifications require this pref to be set.
|
||||
if (AppConstants.platform == "macosx") {
|
||||
Services.prefs.setIntPref(PREF_MAC_LOW_MEM_RESPONSE, 3);
|
||||
}
|
||||
|
||||
TabUnloader.init();
|
||||
|
||||
// Set some WebRTC simulation preferences.
|
||||
|
|
Загрузка…
Ссылка в новой задаче