зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1318273 - Improve the use of SpecialPowers.pushPrefEnv() - part 2, r=qdot
This commit is contained in:
Родитель
cf2ad8072f
Коммит
a895bd31ae
|
@ -548,9 +548,7 @@ function pushPrefs(...aPrefs) {
|
|||
}
|
||||
|
||||
function popPrefs() {
|
||||
return new Promise(resolve => {
|
||||
SpecialPowers.popPrefEnv(resolve);
|
||||
});
|
||||
return SpecialPowers.popPrefEnv();
|
||||
}
|
||||
|
||||
function* checkScroll(tab, expected, msg) {
|
||||
|
|
|
@ -32,10 +32,7 @@ function pushPrefs(...aPrefs) {
|
|||
}
|
||||
|
||||
function popPrefs() {
|
||||
return new Promise((resolve) => {
|
||||
SpecialPowers.popPrefEnv(resolve);
|
||||
resolve();
|
||||
});
|
||||
return SpecialPowers.popPrefEnv();
|
||||
}
|
||||
|
||||
let gTestHangReport = {
|
||||
|
|
|
@ -91,8 +91,8 @@ SpecialPowers.pushPrefEnv({set: [["security.block_script_with_wrong_mime", true]
|
|||
}).then(() => {
|
||||
return Promise.all(MIMETypes.map(testWorkerImportScripts));
|
||||
}).then(() => {
|
||||
SpecialPowers.popPrefEnv(SimpleTest.finish);
|
||||
});
|
||||
return SpecialPowers.popPrefEnv();
|
||||
}).then(SimpleTest.finish);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
}, function(e) {
|
||||
ok(e.name === "SecurityError", "Should fail with a SecurityError");
|
||||
}).then(function() {
|
||||
return new Promise((resolve) => SpecialPowers.popPrefEnv(resolve));
|
||||
return SpecialPowers.popPrefEnv();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ add_task(function* ()
|
|||
|
||||
yield BrowserTestUtils.openNewForegroundTab(gBrowser, INITIAL_URL);
|
||||
|
||||
yield new Promise(resolve => SpecialPowers.popPrefEnv(resolve));
|
||||
yield SpecialPowers.popPrefEnv();
|
||||
|
||||
let browserLoadedPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
|
||||
gBrowser.loadURI(FINAL_URL);
|
||||
|
|
|
@ -127,7 +127,7 @@ body > div > div {width: 1000px;height: 1000px;}\
|
|||
gBrowser.selectedBrowser);
|
||||
|
||||
if (prefsChanged) {
|
||||
yield new Promise(resolve => SpecialPowers.popPrefEnv(resolve));
|
||||
yield SpecialPowers.popPrefEnv();
|
||||
}
|
||||
|
||||
// Start checking for the scroll.
|
||||
|
|
Загрузка…
Ссылка в новой задаче