mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1036220 - Get rid of the dom.mozAlarms.enabled pref. r=nsm r=smaug
This commit is contained in:
parent
66ea77e992
commit
c33c6df12b
@ -437,9 +437,6 @@ pref("dom.phonenumber.substringmatching.VE", 7);
|
||||
pref("dom.phonenumber.substringmatching.CL", 8);
|
||||
pref("dom.phonenumber.substringmatching.PE", 7);
|
||||
|
||||
// WebAlarms
|
||||
pref("dom.mozAlarms.enabled", true);
|
||||
|
||||
// SimplePush
|
||||
pref("services.push.enabled", true);
|
||||
// Debugging enabled.
|
||||
|
@ -199,35 +199,31 @@
|
||||
}
|
||||
|
||||
function startTests() {
|
||||
SpecialPowers.pushPrefEnv({
|
||||
"set": [["dom.mozAlarms.enabled", true]]
|
||||
}, function() {
|
||||
var isAllowedToTest = true;
|
||||
var isAllowedToTest = true;
|
||||
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
testEmptyObject();
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
testEmptyObject();
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
});
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.expectAssertions(0, 9);
|
||||
|
@ -99,35 +99,31 @@
|
||||
}
|
||||
|
||||
function startTests() {
|
||||
SpecialPowers.pushPrefEnv({
|
||||
"set": [["dom.mozAlarms.enabled", true]]
|
||||
}, function() {
|
||||
var isAllowedToTest = true;
|
||||
var isAllowedToTest = true;
|
||||
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
testFutureDate();
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
testFutureDate();
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
});
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.expectAssertions(0, 9);
|
||||
|
@ -117,41 +117,37 @@
|
||||
}
|
||||
|
||||
function startTests() {
|
||||
SpecialPowers.pushPrefEnv({
|
||||
"set": [["dom.mozAlarms.enabled", true]]
|
||||
}, function() {
|
||||
var isAllowedToTest = true;
|
||||
var isAllowedToTest = true;
|
||||
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
|
||||
// Arbitrary date to use for tests
|
||||
var tomorrow = new Date();
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
|
||||
// Kick off the tests
|
||||
testHonorTimezone(tomorrow);
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
|
||||
// Arbitrary date to use for tests
|
||||
var tomorrow = new Date();
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
|
||||
// Kick off the tests
|
||||
testHonorTimezone(tomorrow);
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
});
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.expectAssertions(0, 9);
|
||||
|
@ -13,29 +13,24 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
if (SpecialPowers.hasPermission("alarms", document)) {
|
||||
SpecialPowers.removePermission("alarms", document);
|
||||
window.location.reload();
|
||||
} else {
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.mozAlarms.enabled", true]]}, function() {
|
||||
SpecialPowers.removePermission("alarms", document);
|
||||
|
||||
// mozAlarms is installed on all platforms except Android for the moment.
|
||||
if (navigator.appVersion.indexOf("Android") != -1) {
|
||||
ok(!('mozAlarms' in navigator),
|
||||
"navigator.mozAlarms should not exist without permission");
|
||||
ok(!('AlarmsManager' in window),
|
||||
"Interface AlarmsManager should not exist");
|
||||
} else {
|
||||
ok(!('mozAlarms' in navigator),
|
||||
"navigator.mozAlarms should not exist without permission");
|
||||
ok(!('AlarmsManager' in window),
|
||||
"Interface AlarmsManager should not exist without permission");
|
||||
}
|
||||
SpecialPowers.addPermission("alarms", true, document);
|
||||
SimpleTest.finish();
|
||||
});
|
||||
SpecialPowers.removePermission("alarms", document);
|
||||
// mozAlarms is installed on all platforms except Android for the moment.
|
||||
if (navigator.appVersion.indexOf("Android") != -1) {
|
||||
ok(!('mozAlarms' in navigator),
|
||||
"navigator.mozAlarms should not exist without permission");
|
||||
ok(!('AlarmsManager' in window),
|
||||
"Interface AlarmsManager should not exist");
|
||||
} else {
|
||||
ok(!('mozAlarms' in navigator),
|
||||
"navigator.mozAlarms should not exist without permission");
|
||||
ok(!('AlarmsManager' in window),
|
||||
"Interface AlarmsManager should not exist without permission");
|
||||
}
|
||||
SpecialPowers.addPermission("alarms", true, document);
|
||||
}
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -13,30 +13,24 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.addPermission("alarms", true, document);
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.mozAlarms.enabled", true]]}, function() {
|
||||
SpecialPowers.addPermission("alarms", true, document);
|
||||
|
||||
// mozAlarms is installed on all platforms except Android for the moment.
|
||||
if (navigator.appVersion.indexOf("Android") != -1) {
|
||||
ok('AlarmsManager' in window, "Interface AlarmsManager should exist");
|
||||
try {
|
||||
todo('mozAlarms' in navigator,
|
||||
"mozAlarms is not allowed on Android for now. TODO Bug 863557.");
|
||||
} catch (e) {
|
||||
todo(!e, "('mozAlarms' in navigator) should not throw exceptions once " +
|
||||
"mozAlarms is installed on Android. TODO Bug 863557. " +
|
||||
"Caught exception: " + e);
|
||||
}
|
||||
} else {
|
||||
ok('mozAlarms' in navigator, "navigator.mozAlarms should exist");
|
||||
ok(navigator.mozAlarms instanceof AlarmsManager,
|
||||
"navigator.mozAlarms should be an instance of AlarmsManager");
|
||||
// mozAlarms is installed on all platforms except Android for the moment.
|
||||
if (navigator.appVersion.indexOf("Android") != -1) {
|
||||
ok('AlarmsManager' in window, "Interface AlarmsManager should exist");
|
||||
try {
|
||||
todo('mozAlarms' in navigator,
|
||||
"mozAlarms is not allowed on Android for now. TODO Bug 863557.");
|
||||
} catch (e) {
|
||||
todo(!e, "('mozAlarms' in navigator) should not throw exceptions once " +
|
||||
"mozAlarms is installed on Android. TODO Bug 863557. " +
|
||||
"Caught exception: " + e);
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
});
|
||||
} else {
|
||||
ok('mozAlarms' in navigator, "navigator.mozAlarms should exist");
|
||||
ok(navigator.mozAlarms instanceof AlarmsManager,
|
||||
"navigator.mozAlarms should be an instance of AlarmsManager");
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -72,35 +72,31 @@
|
||||
}
|
||||
|
||||
function startTests() {
|
||||
SpecialPowers.pushPrefEnv({
|
||||
"set": [["dom.mozAlarms.enabled", true]]
|
||||
}, function() {
|
||||
var isAllowedToTest = true;
|
||||
var isAllowedToTest = true;
|
||||
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
if (navigator.appVersion.indexOf("Android") !== -1) {
|
||||
ok(true, "mozAlarms is not allowed on Android for now. " +
|
||||
"TODO Bug 863557.");
|
||||
isAllowedToTest = false;
|
||||
} else if (SpecialPowers.wrap(document).nodePrincipal.appStatus ==
|
||||
SpecialPowers.Ci.nsIPrincipal.APP_STATUS_NOT_INSTALLED) {
|
||||
ok(true, "mozAlarms is not allowed for non-installed apps. " +
|
||||
"TODO Bug 876981.");
|
||||
isAllowedToTest = false;
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
testAddRemove();
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
if (isAllowedToTest) {
|
||||
ok(true, "Start to test...");
|
||||
testAddRemove();
|
||||
} else {
|
||||
// A sanity check to make sure we must run tests on Firefox OS (B2G).
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1) {
|
||||
ok(false, "Should run the test on Firefox OS (B2G)!");
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
});
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.expectAssertions(0, 9);
|
||||
|
@ -46,18 +46,15 @@
|
||||
}
|
||||
|
||||
function startTests() {
|
||||
|
||||
SpecialPowers.pushPrefEnv({"set": [["dom.mozAlarms.enabled", true]]}, function() {
|
||||
// Currently applicable only on FxOS
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1)
|
||||
{
|
||||
testAlarm(10000);
|
||||
} else {
|
||||
ok(true, "mozAlarms on Firefox OS only.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
});
|
||||
// Currently applicable only on FxOS
|
||||
if (navigator.userAgent.indexOf("Mobile") != -1 &&
|
||||
navigator.appVersion.indexOf("Android") == -1)
|
||||
{
|
||||
testAlarm(10000);
|
||||
} else {
|
||||
ok(true, "mozAlarms on Firefox OS only.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.expectAssertions(0, 9);
|
||||
|
@ -25,7 +25,6 @@ var gData = [
|
||||
skip: ["Android"],
|
||||
obj: "mozAlarms",
|
||||
webidl: "AlarmsManager",
|
||||
settings: [["dom.mozAlarms.enabled", true]],
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
@ -113,7 +113,7 @@ var legacyMozPrefixedInterfaces =
|
||||
var interfaceNamesInGlobalScope =
|
||||
[
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "AlarmsManager", pref: "dom.mozAlarms.enabled"},
|
||||
{name: "AlarmsManager", permission: "alarms"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"AnalyserNode",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
@ -8,8 +8,7 @@
|
||||
|
||||
[NavigatorProperty="mozAlarms",
|
||||
JSImplementation="@mozilla.org/alarmsManager;1",
|
||||
CheckPermissions="alarms",
|
||||
Pref="dom.mozAlarms.enabled"]
|
||||
CheckPermissions="alarms"]
|
||||
interface AlarmsManager {
|
||||
DOMRequest getAll();
|
||||
DOMRequest add(any date, DOMString respectTimezone, optional any data);
|
||||
|
@ -3972,9 +3972,6 @@ pref("dom.mozContacts.enabled", false);
|
||||
pref("dom.navigator-property.disable.mozContacts", true);
|
||||
pref("dom.global-constructor.disable.mozContact", true);
|
||||
|
||||
// WebAlarms
|
||||
pref("dom.mozAlarms.enabled", false);
|
||||
|
||||
// SimplePush
|
||||
pref("services.push.enabled", false);
|
||||
|
||||
|
@ -55,9 +55,6 @@ pref("dom.mozPay.enabled", true);
|
||||
// System messages
|
||||
pref("dom.sysmsg.enabled", true);
|
||||
|
||||
// Alarm API
|
||||
pref("dom.mozAlarms.enabled", true);
|
||||
|
||||
// Disable slow script dialog for apps
|
||||
pref("dom.max_script_run_time", 0);
|
||||
pref("dom.max_chrome_script_run_time", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user