Bug 1153499 - Enable push and sw prefs. r=dougt,ehsan

--HG--
extra : commitid : GQaiqrErWLz
extra : rebase_source : 3f01566803616b221b883b51ab079d8868e8e502
extra : source : 06a05093fc417449b9458fa88105e863acddef8d
This commit is contained in:
Nikhil Marathe 2015-07-15 13:12:44 -07:00
Родитель 25e263af21
Коммит 970731b146
23 изменённых файлов: 43 добавлений и 38 удалений

Просмотреть файл

@ -1153,8 +1153,9 @@ pref("gfx.touch.resample", true);
pref("dom.activities.developer_mode_only", "import-app");
// mulet apparently loads firefox.js as well as b2g.js, so we have to explicitly
// disable serviceworkers here to get them disabled in mulet.
// disable serviceworkers and push here to get them disabled in mulet.
pref("dom.serviceWorkers.enabled", false);
pref("dom.push.enabled", false);
// Retain at most 10 processes' layers buffers
pref("layers.compositor-lru-size", 10);

Просмотреть файл

@ -1938,8 +1938,9 @@ pref("browser.pocket.enabledLocales", "cs de en-GB en-US en-ZA es-ES es-MX fr hu
pref("view_source.tab", true);
// Enable Service Workers for desktop on non-release builds
#ifndef RELEASE_BUILD
// Enable ServiceWorkers for Push API consumers.
// Interception is still disabled.
pref("dom.serviceWorkers.enabled", true);
pref("dom.serviceWorkers.interception.enabled", true);
#endif
// Enable Push API.
pref("dom.push.enabled", true);

Просмотреть файл

@ -932,9 +932,9 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"PropertyNodeList",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "PushManager", b2g: false, android: false, release: false},
{name: "PushManager", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "PushSubscription", b2g: false, android: false, release: false},
{name: "PushSubscription", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
"RadioNodeList",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -970,11 +970,11 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"Selection",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "ServiceWorker", release: false, b2g: false},
{name: "ServiceWorker", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "ServiceWorkerContainer", release: false, b2g: false},
{name: "ServiceWorkerContainer", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "ServiceWorkerRegistration", release: false, b2g: false},
{name: "ServiceWorkerRegistration", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
"SettingsLock",
// IMPORTANT: Do not change this list without review from a DOM peer!

Просмотреть файл

@ -17,6 +17,7 @@ function test() {
SpecialPowers.pushPrefEnv({'set': [['dom.serviceWorkers.enabled', true],
['dom.serviceWorkers.exemptFromPerDomainMax', true],
['dom.serviceWorkers.testing.enabled', true],
['dom.serviceWorkers.interception.enabled', true],
['dom.caches.enabled', true]]},
function() {
var url = gTestRoot + 'browser_base_force_refresh.html';

Просмотреть файл

@ -68,6 +68,7 @@ function runTheTest() {
["dom.serviceWorkers.interception.enabled", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
]}, function() {
start();
});

Просмотреть файл

@ -47,7 +47,8 @@ function setup() {
['dom.mozBrowserFramesEnabled', true],
['dom.serviceWorkers.exemptFromPerDomainMax', true],
['dom.serviceWorkers.enabled', true],
['dom.serviceWorkers.testing.enabled', true]
['dom.serviceWorkers.testing.enabled', true],
['dom.serviceWorkers.interception.enabled', true],
]}, () => {
SpecialPowers.pushPermissions([
{ 'type': 'webapps-manage', 'allow': 1, 'context': document },

Просмотреть файл

@ -34,7 +34,8 @@
SpecialPowers.pushPrefEnv({"set": [
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true]
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
]}, runTest);
</script>
</pre>

Просмотреть файл

@ -37,7 +37,8 @@
SpecialPowers.pushPrefEnv({"set": [
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true]
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
]}, runTest);
</script>
</pre>

Просмотреть файл

@ -65,6 +65,8 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
]}, runTest);
</script>
</body>

Просмотреть файл

@ -76,7 +76,8 @@
SpecialPowers.pushPrefEnv({"set": [
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true]
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
]}, runTest);
</script>
</pre>

Просмотреть файл

@ -48,6 +48,7 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["dom.caches.enabled", true],
]}, runTest);
};

Просмотреть файл

@ -48,6 +48,7 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["dom.caches.enabled", true],
]}, runTest);
};

Просмотреть файл

@ -49,6 +49,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=916893
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
["dom.webnotifications.workers.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["notification.prompt.testing", true],
]}, runTest);
</script>

Просмотреть файл

@ -77,6 +77,7 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["dom.serviceWorkers.interception.opaque.enabled", true],
["dom.caches.enabled", true],
]}, runTest);

Просмотреть файл

@ -48,6 +48,7 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["dom.caches.enabled", true],
]}, runTest);
};

Просмотреть файл

@ -48,6 +48,7 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["dom.caches.enabled", true],
]}, runTest);
};

Просмотреть файл

@ -48,6 +48,7 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["dom.caches.enabled", true],
]}, runTest);
};

Просмотреть файл

@ -48,6 +48,7 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
['dom.serviceWorkers.interception.enabled', true],
["dom.caches.enabled", true],
]}, runTest);
};

Просмотреть файл

@ -174,13 +174,13 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"Promise",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushEvent", b2g: false, android: false, release: false },
{ name: "PushEvent", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushManager", b2g: false, android: false, release: false },
{ name: "PushManager", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushMessageData", b2g: false, android: false, release: false },
{ name: "PushMessageData", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushSubscription", b2g: false, android: false, release: false },
{ name: "PushSubscription", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
"Request",
// IMPORTANT: Do not change this list without review from a DOM peer!

Просмотреть файл

@ -143,6 +143,7 @@ let steps = [() => {
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
["dom.serviceWorkers.interception.enabled", true],
["browser.dom.window.dump.enabled", true],
["network.cookie.cookieBehavior", COOKIE_BEHAVIOR_ACCEPT]
]}, next);

Просмотреть файл

@ -166,15 +166,15 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"Promise",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushManager", b2g: false, android: false, release: false },
{ name: "PushManager", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "PushSubscription", b2g: false, android: false, release: false },
{ name: "PushSubscription", b2g: false, android: false},
// IMPORTANT: Do not change this list without review from a DOM peer!
"Request",
// IMPORTANT: Do not change this list without review from a DOM peer!
"Response",
// IMPORTANT: Do not change this list without review from a DOM peer!
{ name: "ServiceWorkerRegistration", release: false, b2g: false },
{ name: "ServiceWorkerRegistration", b2g: false, android: false },
// IMPORTANT: Do not change this list without review from a DOM peer!
"TextDecoder",
// IMPORTANT: Do not change this list without review from a DOM peer!

Просмотреть файл

@ -926,12 +926,6 @@ pref("consoleservice.logcat", false);
pref("consoleservice.logcat", true);
#endif
// Enable Service Workers for Android on non-release builds
#ifndef RELEASE_BUILD
pref("dom.serviceWorkers.enabled", true);
pref("dom.serviceWorkers.interception.enabled", true);
#endif
// Enable Cardboard VR on mobile, assuming VR at all is enabled
pref("dom.vr.cardboard.enabled", true);

Просмотреть файл

@ -139,7 +139,6 @@ pref("dom.workers.maxPerDomain", 20);
// Whether or not Shared Web Workers are enabled.
pref("dom.workers.sharedWorkers.enabled", true);
// Service workers
pref("dom.serviceWorkers.enabled", false);
// Allow service workers to intercept network requests using the fetch event
@ -4448,19 +4447,12 @@ pref("dom.mozAlarms.enabled", false);
// Push
#if !defined(MOZ_B2G) && !defined(ANDROID)
// Desktop prefs
#ifdef RELEASE_BUILD
pref("dom.push.enabled", false);
#else
pref("dom.push.enabled", true);
#endif
#else
// Mobile prefs
pref("dom.push.enabled", false);
#if !defined(RELEASE_BUILD)
pref("dom.push.debug", true);
#endif
pref("dom.push.debug", false);
pref("dom.push.serverURL", "wss://push.services.mozilla.com/");
pref("dom.push.userAgentID", "");