mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 846200 - Update Marionette JS WebAPI Tests to use new settings-api permissions; r=echou r=echen
--HG-- extra : rebase_source : 36a9f3e055a2ff7bcf624e9ef7f8f1e4619de6da
This commit is contained in:
parent
2bb0d92567
commit
267d286990
@ -726,7 +726,7 @@ function startBluetoothTestBase(aPermissions, aTestCaseMain) {
|
||||
}
|
||||
|
||||
function startBluetoothTest(aReenable, aTestCaseMain) {
|
||||
startBluetoothTestBase(["settings-read", "settings-write"], function() {
|
||||
startBluetoothTestBase(["settings-read", "settings-write", "settings-api-read", "settings-api-write"], function() {
|
||||
let origEnabled, needEnable;
|
||||
|
||||
return getBluetoothEnabled()
|
||||
|
@ -58,7 +58,7 @@ function test(aEnabled) {
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
startBluetoothTestBase(["settings-read", "settings-write"],
|
||||
startBluetoothTestBase(["settings-read", "settings-write", "settings-api-read", "settings-api-write"],
|
||||
function testCaseMain() {
|
||||
return getBluetoothEnabled()
|
||||
.then(function(aEnabled) {
|
||||
|
@ -39,7 +39,7 @@ function waitForManagerAttributeChanged() {
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
startBluetoothTestBase(["settings-read", "settings-write"],
|
||||
startBluetoothTestBase(["settings-read", "settings-write", "settings-api-read", "settings-api-write"],
|
||||
function testCaseMain() {
|
||||
let adapters = bluetoothManager.getAdapters();
|
||||
ok(Array.isArray(adapters), "Can not got the array of adapters");
|
||||
|
@ -6,6 +6,8 @@ MARIONETTE_TIMEOUT = 10000;
|
||||
SpecialPowers.addPermission("fmradio", true, document);
|
||||
SpecialPowers.addPermission("settings-read", true, document);
|
||||
SpecialPowers.addPermission("settings-write", true, document);
|
||||
SpecialPowers.addPermission("settings-api-read", true, document);
|
||||
SpecialPowers.addPermission("settings-api-write", true, document);
|
||||
|
||||
let FMRadio = window.navigator.mozFMRadio;
|
||||
let mozSettings = window.navigator.mozSettings;
|
||||
|
@ -151,4 +151,4 @@ startDSDSTestCommon(function() {
|
||||
.then(testEnableDataRoamingWhileRoaming)
|
||||
.then(testDisableData)
|
||||
.then(restoreTestEnvironment);
|
||||
}, ["settings-read", "settings-write"]);
|
||||
}, ["settings-read", "settings-write", "settings-api-read", "settings-api-write"]);
|
||||
|
@ -108,4 +108,4 @@ startTestCommon(function() {
|
||||
.then(() => setEmulatorRoamingAndWait(false))
|
||||
.then(() => setDataRoamingEnabled(false));
|
||||
|
||||
}, ["settings-read", "settings-write"]);
|
||||
}, ["settings-read", "settings-write", "settings-api-read", "settings-api-write"]);
|
@ -125,4 +125,4 @@ startTestCommon(function() {
|
||||
return setDataApnSettings(origApnSettings);
|
||||
}
|
||||
});
|
||||
}, ["settings-read", "settings-write"]);
|
||||
}, ["settings-read", "settings-write", "settings-api-read", "settings-api-write"]);
|
||||
|
@ -38,4 +38,4 @@ startTestCommon(function() {
|
||||
.then(() => setDataEnabled(false))
|
||||
.then(() => setRadioEnabledAndWait(true));
|
||||
|
||||
}, ["settings-read", "settings-write"]);
|
||||
}, ["settings-read", "settings-write", "settings-api-read", "settings-api-write"]);
|
||||
|
@ -538,6 +538,8 @@ let gTestSuite = (function() {
|
||||
let permissions = [{ 'type': 'wifi-manage', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-write', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-read', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-api-write', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-api-read', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'mobileconnection', 'allow': 1, 'context': window.document }];
|
||||
|
||||
SpecialPowers.pushPermissions(permissions, function() {
|
||||
|
@ -209,6 +209,8 @@ let gTestSuite = (function() {
|
||||
let permissions = [{ 'type': 'wifi-manage', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-write', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-read', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-api-write', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'settings-api-read', 'allow': 1, 'context': window.document },
|
||||
{ 'type': 'mobileconnection', 'allow': 1, 'context': window.document }];
|
||||
|
||||
SpecialPowers.pushPermissions(permissions, function() {
|
||||
|
Loading…
Reference in New Issue
Block a user