blob: 6440a470bf4ed17257bc5c1c158de6733593d901 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
async function queryAppName() {
let extension = ExtensionTestUtils.loadExtension({
background() {
browser.test.sendMessage("result", { appName: navigator.appName });
},
});
await extension.startup();
let result = await extension.awaitMessage("result");
await extension.unload();
return result.appName;
}
const APPNAME_OVERRIDE = "MyTestAppName";
add_task(
{
pref_set: [["general.appname.override", APPNAME_OVERRIDE]],
},
async function test_appName_normal() {
let appName = await queryAppName();
Assert.equal(appName, APPNAME_OVERRIDE);
}
);
add_task(
{
pref_set: [
["general.appname.override", APPNAME_OVERRIDE],
["privacy.resistFingerprinting", true],
],
},
async function test_appName_resistFingerprinting() {
let appName = await queryAppName();
Assert.equal(appName, APPNAME_OVERRIDE);
}
);
|