Bug 1577180 - Get a profile before accessing BrowserGlue in test_getPotentialBreachesByLoginGUID.js. r=jaws
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Thu, 29 Aug 2019 15:20:53 +0000
changeset 551155 716ad5a4347ec6ee6cdcc7d16b95da5e4ad7e8d2
parent 551154 32bc8be194acef156fa4ef70ee9a7aa5c826e15b
child 551156 03d9cfc6375de4a2708183ba8920670057e16fde
push id11865
push userbtara@mozilla.com
push dateMon, 02 Sep 2019 08:54:37 +0000
treeherdermozilla-beta@37f59c4671b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1577180
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1577180 - Get a profile before accessing BrowserGlue in test_getPotentialBreachesByLoginGUID.js. r=jaws I'm not sure of the exact cause since that would require doing a local Windows beta build and the getService error doesn't indicate what failed inside the component. I mostly guessed that this was the problem by looking at other tests which do the same thing. Differential Revision: https://phabricator.services.mozilla.com/D43899
browser/components/aboutlogins/tests/unit/test_getPotentialBreachesByLoginGUID.js
--- a/browser/components/aboutlogins/tests/unit/test_getPotentialBreachesByLoginGUID.js
+++ b/browser/components/aboutlogins/tests/unit/test_getPotentialBreachesByLoginGUID.js
@@ -3,16 +3,20 @@
  */
 
 "use strict";
 
 const { RemoteSettings } = ChromeUtils.import(
   "resource://services-settings/remote-settings.js"
 );
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+// Initializing BrowserGlue requires a profile on Windows.
+do_get_profile();
+
 const gBrowserGlue = Cc["@mozilla.org/browser/browserglue;1"].getService(
   Ci.nsIObserver
 );
 
 ChromeUtils.defineModuleGetter(
   this,
   "LoginBreaches",
   "resource:///modules/LoginBreaches.jsm"