Skip to content

Instantly share code, notes, and snippets.

View daleharvey's full-sized avatar

Dale Harvey daleharvey

View GitHub Profile
// Opened with |await BrowserTestUtils.openNewForegroundTab(gBrowser, url);|
// never finished (browserLoaded is never called)
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const DELAY_MS = 200;
const AUTOPLAY_HTML = `<!DOCTYPE HTML>
<html dir="ltr" xml:lang="en-US" lang="en-US">
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const DELAY_MS = 200;
const AUTOPLAY_HTML = `<!DOCTYPE HTML>
<html dir="ltr" xml:lang="en-US" lang="en-US">
<head>
<meta charset="utf8">
</head>
// Opened with |await BrowserTestUtils.openNewForegroundTab(gBrowser, url);|
// never finished (browserLoaded is never called)
const DELAY_MS = 500;
const AUTOPLAY_HTML = `<!DOCTYPE HTML>
<html dir="ltr" xml:lang="en-US" lang="en-US">
<head>
<meta charset="utf8">
</head>
[task 2019-05-25T22:24:10.841Z] 22:24:10 INFO - Entering test bound testSlowLoadingPage
[task 2019-05-25T22:24:10.842Z] 22:24:10 INFO - TEST-PASS | browser/base/content/test/permissions/browser_autoplay_blocked.js | test started -
[task 2019-05-25T22:24:10.845Z] 22:24:10 INFO - TEST-PASS | browser/base/content/test/permissions/browser_autoplay_blocked.js | PAGE LOADING: about:home -
[task 2019-05-25T22:24:10.850Z] 22:24:10 INFO - TEST-PASS | browser/base/content/test/permissions/browser_autoplay_blocked.js | PAGE LOADING: SLOW_AUTOPLAY_PAGE -
[task 2019-05-25T22:24:10.853Z] 22:24:10 INFO - Buffered messages logged at 22:23:33
[task 2019-05-25T22:24:10.855Z] 22:24:10 INFO - Console message: [JavaScript Warning: "Autoplay is only allowed when approved by the user, the site is activated by the user, or media is muted." {file: "https://example.com/browser/browser/base/content/test/permissions/browser_autoplay_blocked_slow.sjs" line: 0}]
[task 2019-05-25T22:24:10.857Z] 22:24:10 INFO
if (AppConstants.platform == "android") {
let enginesFromURLs = await this._loadFromChromeURLs(engines, isReload);
enginesFromURLs.forEach(this._addEngineToStore, this);
} else {
for (let [id, locales] of engineLocales) {
await this._ensureEngine(id, locales);
}
}
async _ensureEngine(id, locales) {
~/src/gecko (master)$ ./mach run -profile ~/Desktop/newtemp/
0:00.57 /Users/dale/src/gecko/objdir/firefox-opt/dist/Nightly.app/Contents/MacOS/firefox -profile /Users/dale/Desktop/newtemp/ -no-remote -foreground
*** Search: SearchService.init
*** Search: _init start
*** Search: SearchService.init
*** Search: _loadEngines: start
*** Search: _findEngines: looking for engines in JARs
*** Search: _loadEngines: loading - google-b-d,amazon-en-GB,bing,ddg,ebay-uk,twitter,wikipedia
*** Search: _loadEngines: Absent or outdated cache. Loading engines from disk.
*** Search: _loadEngines: Found previously installed extension
~/src/gecko (master)$ ./mach run -profile ~/Desktop/tmpprofile/
0:00.51 /Users/dale/src/gecko/objdir/firefox-opt/dist/Nightly.app/Contents/MacOS/firefox -profile /Users/dale/Desktop/tmpprofile/ -no-remote -foreground
*** Search: SearchService.init
*** Search: _init start
*** Search: SearchService.init
*** Search: _loadEngines: start
*** Search: _findEngines: looking for engines in JARs
*** Search: _loadEngines: loading - google-b-d,amazon-en-GB,bing,ddg,ebay-uk,twitter,wikipedia
*** Search: _loadEngines: Absent or outdated cache. Loading engines from disk.
*** Search: _loadEngines: Found previously installed extension
~/src/gecko (master)$ ./mach run -profile /Users/dale/Desktop/8ctzi41v.default-nightly-1
0:00.66 /Users/dale/src/gecko/objdir/firefox-opt/dist/Nightly.app/Contents/MacOS/firefox -profile /Users/dale/Desktop/8ctzi41v.default-nightly-1 -no-remote -foreground
*** Search: SearchService.init
*** Search: _init start
*** Search: SearchService.init
*** Search: _loadEngines: start
*** Search: _findEngines: looking for engines in JARs
*** Search: _loadEngines: loading - google-b-d,amazon-en-GB,bing,ddg,ebay-uk,twitter,wikipedia
*** Search: _loadEngines: Absent or outdated cache. Loading engines from disk.
*** Search: _loadEngines: Found previously installed extension
~/src/gecko (master)$ RELOAD_ENGINES=1 ./mach run
0:00.44 /Users/dale/src/gecko/objdir/firefox-opt/dist/Nightly.app/Contents/MacOS/firefox -no-remote -foreground -profile /Users/dale/src/gecko/objdir/firefox-opt/tmp/profile-default
1557493946856 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider", "XPIInternal"]
1557493946867 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/GMPProvider.jsm
1557493946868 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/PluginProvider.jsm
1557493946869 addons.manager DEBUG Starting provider: XPIProvider
1557493946869 addons.xpi DEBUG startup
1557493946870 addons.xpi INFO SystemAddonLocation directory is missing
1557493946870 addons.xpi DEBUG checkForChanges
1557493946871 addons.xpi DEBUG Loaded add-on state: {"app-profile":{"addons":{"[email protected]":{"dependencies":[],"enabled":true,"lastModifiedTime":1557493840000,"loader":null,"path":"
*** Search: addEnginesFromExtension: Failed to install [email protected]: "The extension has not been initialized."
thrown from:
await extension.getLocalizedManifest(locale)
Which is called from startup by:
for (let [id, localeMap] of this._extensions) {
let policy = WebExtensionPolicy.getByID(id);