mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-09 04:54:33 +00:00
29 lines
683 B
JavaScript
29 lines
683 B
JavaScript
"use strict";
|
|
|
|
function setupPrefsAndPermissions(callback) {
|
|
setupPrefs(function() {
|
|
SpecialPowers.pushPermissions([
|
|
{"type":"tv", "allow":1, "context":document}
|
|
], callback);
|
|
});
|
|
}
|
|
|
|
function setupPrefs(callback) {
|
|
SpecialPowers.pushPrefEnv({"set": [["dom.tv.enabled", true],
|
|
["dom.ignore_webidl_scope_checks", true]]}, function() {
|
|
callback();
|
|
});
|
|
}
|
|
|
|
function removePrefsAndPermissions(callback) {
|
|
SpecialPowers.popPrefEnv(function() {
|
|
SpecialPowers.popPermissions(callback);
|
|
});
|
|
}
|
|
|
|
function prepareTest(callback) {
|
|
removePrefsAndPermissions(function() {
|
|
setupPrefsAndPermissions(callback);
|
|
});
|
|
}
|