Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: toolkit/components/search/tests/xpcshell/xpcshell.toml
/* Any copyright is dedicated to the Public Domain.
/*
* Test engine order is not set after engine reload.
*/
"use strict";
add_setup(async function () {
SearchTestUtils.setRemoteSettingsConfig([
{ identifier: "globalDefault" },
{ identifier: "trDefault" },
{
globalDefault: "globalDefault",
specificDefaults: [
{
default: "trDefault",
environment: { regions: ["tr"] },
},
],
},
]);
});
add_task(async function basic_multilocale_test() {
let resolver;
let initPromise = new Promise(resolve => (resolver = resolve));
useCustomGeoServer("TR", initPromise);
await Services.search.init();
await Services.search.getAppProvidedEngines();
resolver();
await SearchTestUtils.promiseSearchNotification("engines-reloaded");
let engines = await Services.search.getAppProvidedEngines();
Assert.deepEqual(
engines.map(e => e._name),
["trDefault", "globalDefault"],
"Special engine is default so should be first"
);
engines.forEach(engine => {
Assert.ok(!engine._metaData.order, "Order is not defined");
});
Assert.equal(
Services.search.wrappedJSObject._settings.getMetaDataAttribute(
"useSavedOrder"
),
false,
"We should not set the engine order during maybeReloadEngines"
);
});