trisquel-icecat/icecat/toolkit/components/search/tests/xpcshell/test_searchUrlDomain.js
2025-10-06 02:35:48 -06:00

31 lines
635 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
/*
* Tests searchUrlDomain API.
*/
"use strict";
const CONFIG = [
{
identifier: "appDefault",
base: {
urls: {
search: { base: "https://www.example.com", searchTermParamName: "q" },
},
},
},
];
add_setup(async function () {
SearchTestUtils.setRemoteSettingsConfig(CONFIG);
});
add_task(async function test_resultDomain() {
await Services.search.init();
let engine = Services.search.getEngineById("appDefault");
Assert.equal(engine.searchUrlDomain, "www.example.com");
});