Bug 1543973 - Switch to AppConstants to avoid appinfo conflict. r=mixedpuppy

Differential Revision: https://phabricator.services.mozilla.com/D27804

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dale Harvey 2019-04-16 20:56:56 +00:00
Родитель 5d842c0354
Коммит c3bdb93609
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -1,9 +1,14 @@
const {AddonTestUtils} = ChromeUtils.import("resource://testing-common/AddonTestUtils.jsm");
const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
const kSearchEngineID = "test_urifixup_search_engine";
const kSearchEngineURL = "http://www.example.org/?search={searchTerms}";
const kForceHostLookup = "browser.fixup.dns_first_for_single_words";
AddonTestUtils.init(this);
AddonTestUtils.overrideCertDB();
AddonTestUtils.createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "42");
// TODO(bug 1522134), this test should also use
// combinations of the following flags.
var flagInputs = [
@ -465,7 +470,7 @@ var testcases = [ {
},
];
if (Services.appinfo.OS.toLowerCase().startsWith("win")) {
if (AppConstants.platform == "win") {
testcases.push({
input: "C:\\some\\file.txt",
fixedURI: "file:///C:/some/file.txt",
@ -494,10 +499,6 @@ function sanitize(input) {
return input.replace(/\r|\n/g, "").trim();
}
AddonTestUtils.init(this);
AddonTestUtils.overrideCertDB();
AddonTestUtils.createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "42");
add_task(async function setup() {
var prefList = ["browser.fixup.typo.scheme", "keyword.enabled",
"browser.fixup.domainwhitelist.whitelisted"];