Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'win' && socketprocess_networking && fission OR os == 'mac' && socketprocess_networking && fission OR os == 'mac' && debug OR os == 'linux' && socketprocess_networking
- Manifest: toolkit/components/extensions/test/xpcshell/xpcshell-remote.toml includes toolkit/components/extensions/test/xpcshell/xpcshell-common.toml
- Manifest: toolkit/components/extensions/test/xpcshell/xpcshell.toml includes toolkit/components/extensions/test/xpcshell/xpcshell-common.toml
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
async function queryBuildID() {
let extension = ExtensionTestUtils.loadExtension({
background() {
browser.test.sendMessage("result", { buildID: navigator.buildID });
},
});
await extension.startup();
let { buildID } = await extension.awaitMessage("result");
await extension.unload();
return buildID;
}
const BUILDID_OVERRIDE = "Overridden buildID";
add_task(
{
pref_set: [["general.buildID.override", BUILDID_OVERRIDE]],
},
async function test_buildID_normal() {
let buildID = await queryBuildID();
Assert.equal(buildID, BUILDID_OVERRIDE);
}
);
add_task(
{
pref_set: [
["general.buildID.override", BUILDID_OVERRIDE],
["privacy.resistFingerprinting", true],
],
},
async function test_buildID_resistFingerprinting() {
let buildID = await queryBuildID();
Assert.equal(buildID, BUILDID_OVERRIDE);
}
);