This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let extension = await installSearchExtension("example", "Example", "1.0"); | |
extension = await installSearchExtension("example", "Example", "2.0"); | |
async function installSearchExtension(id, name, version) { | |
let extensionInfo = { | |
useAddonManager: "permanent", | |
manifest: { | |
version, | |
applications: { | |
gecko: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CASES = { | |
ayrshire: { label: "Ayrshire", cases: [4]}, | |
borders: { label: "Borders", cases: [2]}, | |
dumfries: { label: "Dumfries", cases: [0]}, | |
fife: { label: "Fife", cases: [3]}, | |
forth: { label: "Forth Valley", cases: [6]}, | |
grampian: { label: "Grampian", cases: [7]}, | |
glasgow: { label: "Glasgow", cases: [10]}, | |
highland: { label: "Highlands", cases: [0]}, | |
lanarkshire: { label: "Lanarkshire", cases: [7]}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"appliesTo": [{ | |
"included": { | |
"applications": { | |
"distributions": ["acer-001"] | |
}, | |
"locales": { | |
"matches": [ | |
"ach", "af", "an", "ar", "ast", "az", "ca", "ca-valencia", | |
"cak", "da", "de", "dsb", "el", "eo", "es-CL", "es-ES", | |
"es-MX", "eu", "fa", "ff", "fi", "fr", "fy-NL", "gn", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// searchItem.click() will load a page, I want to Assert that page does not | |
// have the text 'error' in it | |
// Fails on treeherder with | |
// Uncaught exception - at chrome://mochitests/content/browser/browser/components/search/test/browser/browser_contextmenu.js:126 - TypeError: can't access property "innerHTML", content.document.body is null | |
let loaded = BrowserTestUtils.waitForNewTab(win.gBrowser, expectedBaseUrl); | |
searchItem.click(); | |
let searchTab = await loaded; | |
let browser = win.gBrowser.selectedBrowser; | |
await SpecialPowers.spawn(browser, [], async function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Services.prefs.setCharPref("intl.locale.requested", "de"); | |
Services.locale.requestedLocales = ["de"]; | |
dump(Services.prefs.getCharPref("intl.locale.requested") + "\n"); | |
dump(Services.locale.appLocaleAsBCP47 + "\n"); | |
Outputs: | |
0:03.82 pid:73425 de | |
0:03.82 pid:73425 en-US |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WEBRENDER | |
opt-in by default: WebRender is an opt-in feature | |
available by user: Force enabled by envvar | |
WEBRENDER_QUALIFIED | |
blacklisted by env: No qualified hardware | |
WEBRENDER_COMPOSITOR | |
available by user: Enabled | |
WEBGPU | |
disabled by default: Disabled by default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dump("Setting: " + name + "\n"); | |
updateAppInfo({ | |
ID: "[email protected]", | |
name, | |
version, | |
platformVersion: version | |
}); | |
dump("Getting: " + Services.appinfo.name + "\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0:03.15 pid:25720 *** Search: addEnginesFromExtension: [email protected] | |
0:03.15 pid:25720 *** Search: addEnginesFromExtension: Ignoring builtIn engine. | |
0:03.15 pid:25720 *** Search: _setIcon: Setting icon url "moz-extension://51e574db-b7d0-184b-ad17-8d0e1442fe14/favicon.ico" for engine "Wikipedia (en)". | |
0:03.15 pid:25720 *** Search: _addEngineToStore: Adding engine: "Google" | |
0:03.15 pid:25720 *** Search: _addEngineToStore: Adding engine: "Amazon.com" | |
0:03.15 pid:25720 *** Search: _addEngineToStore: Adding engine: "eBay" | |
0:03.15 pid:25720 *** Search: _addEngineToStore: Adding engine: "DuckDuckGo" | |
0:03.15 pid:25720 *** Search: _addEngineToStore: Adding engine: "Bing" | |
0:03.15 pid:25720 *** Search: _addEngineToStore: Adding engine: "Twitter" | |
0:03.15 pid:25720 *** Search: _addEngineToStore: Adding engine: "Wikipedia (en)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works fine | |
const { SearchService } = ChromeUtils.import( | |
"resource://gre/modules/SearchService.jsm" | |
); | |
but | |
const { SearchTestUtils } = ChromeUtils.import( | |
"resource://testing-common/SearchTestUtils.jsm" | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); | |
XPCOMUtils.defineLazyModuleGetters(this, { | |
Services: "resource://gre/modules/Services.jsm", | |
SearchTestUtils: "resource://testing-common/SearchTestUtils.jsm", | |
}); | |
async function getLocales() { | |
console.log(SearchTestUtils); | |
} |