commit 60f355aeb3c78a585ef269d80469a35a2fd9bad1
parent d5eeb5b97c6405fe13181186285467a5c8003f10
Author: frankjc2022 <frankjc2022@gmail.com>
Date: Wed, 7 Jan 2026 16:42:50 +0000
Bug 2008969 - Export functions in SearchBrowsingHistoryDomainBoost r=tzhang,ai-models-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D278149
Diffstat:
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/browser/components/aiwindow/models/SearchBrowsingHistoryDomainBoost.sys.mjs b/browser/components/aiwindow/models/SearchBrowsingHistoryDomainBoost.sys.mjs
@@ -27,7 +27,7 @@ export const CATEGORIES_JSON = {
"console games",
],
domains: [
- "steampowered.com",
+ "store.steampowered.com",
"roblox.com",
"ign.com",
"gamespot.com",
@@ -394,3 +394,9 @@ export function mergeDedupe(primary, secondary, limit) {
return out;
}
+
+export const SearchBrowsingHistoryDomainBoost = Object.freeze({
+ matchDomains,
+ searchByDomains,
+ mergeDedupe,
+});
diff --git a/browser/components/aiwindow/models/tests/xpcshell/test_SearchBrowsingHistoryDomainBoost.js b/browser/components/aiwindow/models/tests/xpcshell/test_SearchBrowsingHistoryDomainBoost.js
@@ -12,8 +12,8 @@ add_task(async function test_matchDomains_games_and_boundary_behavior() {
// Positive: should match games category
const domains = matchDomains("video games");
Assert.ok(
- domains?.includes("steampowered.com"),
- "Should include steampowered.com for games"
+ domains?.includes("store.steampowered.com"),
+ "Should include store.steampowered.com for games"
);
// Negative: should not match substrings inside words ("endgame" should not trigger "game")