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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const test = new SearchConfigTest({
identifier: "qwant",
aliases: ["@qwant"],
default: {
// Not default anywhere.
},
available: {
included: [
{
locales: ["fr"],
},
{
regions: ["be", "ch", "es", "fr", "it", "nl"],
},
],
},
details: [
{
included: [{}],
domain: "www.qwant.com",
telemetryId: "qwant",
searchUrlCode: "client=brz-moz",
suggestUrlCode: "client=opensearch",
},
],
});
add_setup(async function () {
if (SearchUtils.newSearchConfigEnabled) {
await test.setup();
} else {
await test.setup("124.0");
}
});
add_task(async function test_searchConfig_qwant() {
await test.run();
});
add_task(
{ skip_if: () => SearchUtils.newSearchConfigEnabled },
async function test_searchConfig_qwant_pre124() {
const version = "123.0";
AddonTestUtils.createAppInfo(
"xpcshell@tests.mozilla.org",
"XPCShell",
version,
version
);
// For pre-124, Qwant is not available in the extra regions.
test._config.available.included.pop();
await test.run();
}
);
|