Pier Angelo Vendrame pushed to branch tor-browser-149.0a1-16.0-2 at The Tor
Project / Applications / Tor Browser
Commits:
edab3fe7 by Pier Angelo Vendrame at 2026-03-24T09:54:08+01:00
fixup! BB 43525: Skip Remote Settings for search engine customization.
BB 44757: Fix search engine tests for Firefox 149.
- - - - -
e4ec416f by Pier Angelo Vendrame at 2026-03-24T09:54:56+01:00
fixup! BB 40925: Implemented the Security Level component
BB 44757: Fix search engine tests for Firefox 149.
- - - - -
2 changed files:
- toolkit/components/search/tests/xpcshell/test_base_browser.js
- toolkit/components/search/tests/xpcshell/test_security_level.js
Changes:
=====================================
toolkit/components/search/tests/xpcshell/test_base_browser.js
=====================================
@@ -10,6 +10,10 @@
"use strict";
+const { SearchService } = ChromeUtils.importESModule(
+ "moz-src:///toolkit/components/search/SearchService.sys.mjs"
+);
+
const expectedURLs = {
ddg: "https://duckduckgo.com/?q=test",
"ddg-noai": "https://noai.duckduckgo.com/?q=test",
@@ -23,24 +27,23 @@ const expectedURLs = {
const defaultEngine = "ddg";
add_setup(async function setup() {
- await Services.search.init();
+ await SearchService.init();
});
add_task(async function test_listEngines() {
- const { engines } =
- await Services.search.wrappedJSObject._fetchEngineSelectorEngines();
+ const { engines } = await SearchService._fetchEngineSelectorEngines();
const foundIdentifiers = engines.map(e => e.identifier);
Assert.deepEqual(foundIdentifiers, Object.keys(expectedURLs));
});
add_task(async function test_default() {
Assert.equal(
- (await Services.search.getDefault()).id,
+ (await SearchService.getDefault()).id,
defaultEngine,
`${defaultEngine} is our default search engine in normal mode.`
);
Assert.equal(
- (await Services.search.getDefaultPrivate()).id,
+ (await SearchService.getDefaultPrivate()).id,
defaultEngine,
`${defaultEngine} is our default search engine in PBM.`
);
@@ -48,7 +51,7 @@ add_task(async function test_default() {
add_task(function test_checkSearchURLs() {
for (const [id, url] of Object.entries(expectedURLs)) {
- const engine = Services.search.getEngineById(id);
+ const engine = SearchService.getEngineById(id);
const foundUrl = engine.getSubmission("test").uri.spec;
Assert.equal(foundUrl, url, `The URL of ${engine.name} is not altered.`);
}
@@ -56,7 +59,7 @@ add_task(function test_checkSearchURLs() {
add_task(async function test_iconsDoesNotFail() {
for (const id of Object.keys(expectedURLs)) {
- const engine = Services.search.getEngineById(id);
+ const engine = SearchService.getEngineById(id);
// No need to assert anything, as in case of error this method should
throw.
await engine.getIconURL();
}
=====================================
toolkit/components/search/tests/xpcshell/test_security_level.js
=====================================
@@ -8,6 +8,10 @@
"use strict";
+const { SearchService } = ChromeUtils.importESModule(
+ "moz-src:///toolkit/components/search/SearchService.sys.mjs"
+);
+
const expectedURLs = {
ddg: "https://html.duckduckgo.com/html?q=test",
"ddg-onion":
@@ -15,9 +19,9 @@ const expectedURLs = {
};
add_task(async function test_securityLevel() {
- await Services.search.init();
+ await SearchService.init();
for (const [id, url] of Object.entries(expectedURLs)) {
- const engine = Services.search.getEngineById(id);
+ const engine = SearchService.getEngineById(id);
const foundUrl = engine.getSubmission("test").uri.spec;
Assert.equal(foundUrl, url, `${engine.name} is in HTML mode.`);
}
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/a9088f07fcd47e53562e10f1f3e9ecc06bba539f...e4ec416f1bddcbe468addff3c638831b3d95fa27
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/a9088f07fcd47e53562e10f1f3e9ecc06bba539f...e4ec416f1bddcbe468addff3c638831b3d95fa27
You're receiving this email because of your account on gitlab.torproject.org.
Manage all notifications: https://gitlab.torproject.org/-/profile/notifications
| Help: https://gitlab.torproject.org/help
_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]