mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1585582 - Set appcache prefs on before start to prevent races in tests. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D47977 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c25b106076
commit
ff67914f11
@ -3,6 +3,9 @@ support-files=
|
||||
head.js
|
||||
dummy.js
|
||||
dummy_page.html
|
||||
prefs=
|
||||
browser.cache.offline.enable=true
|
||||
browser.cache.offline.storage.enable=true
|
||||
|
||||
[browser_purgehistory_clears_sh.js]
|
||||
[browser_sanitize-formhistory.js]
|
||||
|
@ -490,8 +490,6 @@ add_task(async function test_form_entries() {
|
||||
|
||||
// Test for offline cache deletion
|
||||
add_task(async function test_offline_cache() {
|
||||
Services.prefs.setBoolPref("browser.cache.offline.enable", true);
|
||||
Services.prefs.setBoolPref("browser.cache.offline.storage.enable", true);
|
||||
// Prepare stuff, we will work with www.example.com
|
||||
var URL = "http://www.example.com";
|
||||
var URI = makeURI(URL);
|
||||
@ -570,8 +568,6 @@ add_task(async function test_offline_cache() {
|
||||
cacheListener
|
||||
);
|
||||
await wh.promiseClosed;
|
||||
Services.prefs.clearUserPref("browser.cache.offline.enable");
|
||||
Services.prefs.clearUserPref("browser.cache.offline.storage.enable");
|
||||
});
|
||||
|
||||
// Test for offline apps permission deletion
|
||||
|
@ -40,3 +40,7 @@ user_pref("dom.animations-api.implicit-keyframes.enabled", true);
|
||||
// sometime wpt runs test even before the document becomes visible, which would
|
||||
// delay video.play() and cause play() running in wrong order.
|
||||
user_pref("media.block-autoplay-until-in-foreground", false);
|
||||
user_pref("media.block-autoplay-until-in-foreground", false);
|
||||
// Enable AppCache globally for now whilst it's being removed in Bug 1584984
|
||||
user_pref("browser.cache.offline.storage.enable", true);
|
||||
user_pref("browser.cache.offline.enable", true);
|
||||
|
@ -1,5 +1,5 @@
|
||||
[appcache.tentative.https.sub.html]
|
||||
expected: TIMEOUT
|
||||
prefs: [browser.cache.offline.storage.enable:true,browser.cache.offline.enable:true]
|
||||
[Appcache!]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
@ -406,8 +406,6 @@ async function test_push_cleared() {
|
||||
const { PushService } = serviceExports;
|
||||
const userAgentID = "bd744428-f125-436a-b6d0-dd0c9845837f";
|
||||
const channelID = "0ef2ad4a-6c49-41ad-af6e-95d2425276bf";
|
||||
Services.prefs.setBoolPref("browser.cache.offline.storage.enable", true);
|
||||
Services.prefs.setBoolPref("browser.cache.offline.enable", true);
|
||||
|
||||
let db = PushServiceWebSocket.newPushDB();
|
||||
|
||||
@ -557,10 +555,18 @@ var tests = [
|
||||
|
||||
// Storage
|
||||
test_storage_cleared,
|
||||
];
|
||||
|
||||
// Cache
|
||||
test_cache_cleared,
|
||||
];
|
||||
//
|
||||
// Due to these prefs being static, setting them doesn't make a difference in time for the test
|
||||
// As we are removing AppCache in Bug 1584984 this will just be removed soon.
|
||||
if (
|
||||
Services.prefs.getBoolPref("browser.cache.offline.enable") &&
|
||||
Services.prefs.getBoolPref("browser.cache.offline.storage.enable")
|
||||
) {
|
||||
tests.push(test_cache_cleared);
|
||||
}
|
||||
|
||||
function run_test() {
|
||||
for (let i = 0; i < tests.length; i++) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
[DEFAULT]
|
||||
prefs = [browser.cache.offline.enable = true, browser.cache.offline.storage.enable=true]
|
||||
head = head_forgetaboutsite.js ../../../../dom/push/test/xpcshell/head.js
|
||||
skip-if = toolkit == 'android'
|
||||
support-files =
|
||||
|
Loading…
Reference in New Issue
Block a user