mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 846200 - Update mochitests to use new settings-api permissions; r=bent
--HG-- extra : rebase_source : edf9accf26a49a541c2f87847c2fe89c42a20fd6
This commit is contained in:
parent
0c31500dac
commit
61adc43df3
@ -15,6 +15,7 @@ var gData = [
|
||||
permission: "settings",
|
||||
access: READWRITE,
|
||||
expected: ["settings-read", "settings-write",
|
||||
"settings-api-read", "settings-api-write",
|
||||
"indexedDB-chrome-settings-read",
|
||||
"indexedDB-chrome-settings-write"]
|
||||
},
|
||||
|
@ -25,6 +25,8 @@ if (SpecialPowers.isMainProcess()) {
|
||||
SpecialPowers.Cu.import("resource://gre/modules/SettingsChangeNotifier.jsm");
|
||||
}
|
||||
|
||||
SpecialPowers.addPermission("settings-api-read", true, document);
|
||||
SpecialPowers.addPermission("settings-api-write", true, document);
|
||||
SpecialPowers.addPermission("settings-read", true, document);
|
||||
SpecialPowers.addPermission("settings-write", true, document);
|
||||
|
||||
|
@ -27,6 +27,8 @@ if (SpecialPowers.isMainProcess()) {
|
||||
|
||||
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);
|
||||
|
||||
function onUnwantedSuccess() {
|
||||
ok(false, "onUnwantedSuccess: shouldn't get here");
|
||||
|
@ -27,6 +27,8 @@ if (SpecialPowers.isMainProcess()) {
|
||||
|
||||
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);
|
||||
|
||||
function onUnwantedSuccess() {
|
||||
ok(false, "onUnwantedSuccess: shouldn't get here");
|
||||
|
@ -32,7 +32,9 @@ function testPref() {
|
||||
|
||||
SpecialPowers.pushPermissions([
|
||||
{type: "settings-read", allow: 0, context: document},
|
||||
{type: "settings-write", allow: 0, context: document}
|
||||
{type: "settings-write", allow: 0, context: document},
|
||||
{type: "settings-api-read", allow: 0, context: document},
|
||||
{type: "settings-api-write", allow: 0, context: document}
|
||||
], function() {
|
||||
ise(frames[0].navigator.mozSettings, null, "navigator.mozSettings is null when the page doesn't have permissions");
|
||||
testPref();
|
||||
|
@ -27,6 +27,8 @@ if (SpecialPowers.isMainProcess()) {
|
||||
|
||||
SpecialPowers.addPermission("settings-write", true, document);
|
||||
SpecialPowers.addPermission("settings-read", true, document);
|
||||
SpecialPowers.addPermission("settings-api-read", true, document);
|
||||
SpecialPowers.addPermission("settings-api-write", true, document);
|
||||
|
||||
var screenBright = {"screen.brightness": 0.7};
|
||||
|
||||
|
@ -31,7 +31,11 @@ if (SpecialPowers.isMainProcess()) {
|
||||
|
||||
function test1() {
|
||||
//This pushPermissions call is after pushPrefEnv call and pushPrefEnv calls follow after this
|
||||
SpecialPowers.pushPermissions([{'type': 'settings-read', 'allow': true, 'context': document}, {'type': 'settings-write', 'allow': true, 'context': document}], test2);
|
||||
SpecialPowers.pushPermissions([{'type': 'settings-read', 'allow': true, 'context': document},
|
||||
{'type': 'settings-write', 'allow': true, 'context': document},
|
||||
{'type': 'settings-api-write', 'allow': true, 'context': document},
|
||||
{'type': 'settings-api-read', 'allow': true, 'context': document}
|
||||
], test2);
|
||||
}
|
||||
|
||||
function test2() {
|
||||
|
@ -31,7 +31,11 @@ if (SpecialPowers.isMainProcess()) {
|
||||
|
||||
function test1() {
|
||||
//This pushPermissions call is after pushPrefEnv call and pushPrefEnv calls follow after this
|
||||
SpecialPowers.pushPermissions([{'type': 'settings-read', 'allow': true, 'context': document}, {'type': 'settings-write', 'allow': true, 'context': document}], test2);
|
||||
SpecialPowers.pushPermissions([{'type': 'settings-read', 'allow': true, 'context': document},
|
||||
{'type': 'settings-write', 'allow': true, 'context': document},
|
||||
{'type': 'settings-api-write', 'allow': true, 'context': document},
|
||||
{'type': 'settings-api-read', 'allow': true, 'context': document}
|
||||
], test2);
|
||||
}
|
||||
|
||||
var watchId;
|
||||
|
Loading…
Reference in New Issue
Block a user