Skip to content

Commit ba30f1d

Browse files
committed
Bug 1966726 - Add a test to ensure that search engines are ordered by name in the engine selector. r=mcheang
Differential Revision: https://phabricator.services.mozilla.com/D249637 UltraBlame original commit: f35910043aaf67049d168a36f883baf1dc29a7c3
1 parent 1c236c3 commit ba30f1d

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

toolkit/components/search/tests/xpcshell/test_engine_selector_engine_orders.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,15 @@ const STARTS_WITH_WIKI_CONFIG = [
109109
];
110110

111111
const DEFAULTS_CONFIG = [
112-
{ identifier: "b-engine" },
113-
{ identifier: "a-engine" },
112+
113+
114+
{ identifier: "alpha-engine-3", base: { name: "Golf" } },
115+
{ identifier: "alpha-engine-2", base: { name: "November" } },
116+
{ identifier: "alpha-engine-1", base: { name: "Sierra" } },
117+
118+
{ identifier: "b-engine", base: { name: "Tango" } },
119+
{ identifier: "a-engine", base: { name: "Uniform" } },
120+
114121
{ identifier: "default-engine" },
115122
{ identifier: "default-private-engine" },
116123
{
@@ -124,7 +131,7 @@ const DEFAULTS_CONFIG = [
124131
locales: ["en-CA"],
125132
regions: ["CA"],
126133
},
127-
order: ["a-engine", "b-engine"],
134+
order: ["b-engine", "a-engine"],
128135
},
129136
],
130137
},
@@ -235,7 +242,15 @@ add_task(async function test_selector_match_engine_orders_with_defaults() {
235242
locale: "en-CA",
236243
region: "CA",
237244
},
238-
["default-engine", "default-private-engine", "a-engine", "b-engine"],
239-
"Should order the default engine first, default private engine second, and the rest of the engines in the correct order."
245+
[
246+
"default-engine",
247+
"default-private-engine",
248+
"b-engine",
249+
"a-engine",
250+
"alpha-engine-3",
251+
"alpha-engine-2",
252+
"alpha-engine-1",
253+
],
254+
"Should order the default engine first, default private engine second, ordered engines and then the rest in alphabetical order by name."
240255
);
241256
});

0 commit comments

Comments
 (0)