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:
Kyle Machulis 2014-08-27 21:01:29 -07:00
parent 61adc43df3
commit d83f17e7d0
10 changed files with 13 additions and 7 deletions

View File

@ -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()

View File

@ -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) {

View File

@ -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");

View File

@ -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;

View File

@ -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"]);

View File

@ -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"]);

View File

@ -125,4 +125,4 @@ startTestCommon(function() {
return setDataApnSettings(origApnSettings);
}
});
}, ["settings-read", "settings-write"]);
}, ["settings-read", "settings-write", "settings-api-read", "settings-api-write"]);

View File

@ -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"]);

View File

@ -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() {

View File

@ -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() {