зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1223510, part 2 - Make ArchiveReader tests use pushPrefEnv. r=baku
This commit is contained in:
Родитель
e88bc9ebb1
Коммит
126f1a832f
|
@ -3,35 +3,21 @@
|
|||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
var archiveReaderEnabled = false;
|
||||
|
||||
var testGenerator = testSteps();
|
||||
|
||||
function runTest()
|
||||
{
|
||||
enableArchiveReader();
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
testGenerator.next();
|
||||
|
||||
SpecialPowers.pushPrefEnv({'set': [ ["dom.archivereader.enabled", true] ]}, function() {
|
||||
return testGenerator.next();
|
||||
});
|
||||
}
|
||||
|
||||
function finishTest()
|
||||
{
|
||||
resetArchiveReader();
|
||||
|
||||
SimpleTest.executeSoon(function() {
|
||||
SpecialPowers.popPrefEnv(function() {
|
||||
testGenerator.close();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}
|
||||
|
||||
function enableArchiveReader()
|
||||
{
|
||||
archiveReaderEnabled = SpecialPowers.getBoolPref("dom.archivereader.enabled");
|
||||
SpecialPowers.setBoolPref("dom.archivereader.enabled", true);
|
||||
}
|
||||
|
||||
function resetArchiveReader()
|
||||
{
|
||||
SpecialPowers.setBoolPref("dom.archivereader.enabled", archiveReaderEnabled);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче