forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1561435 - Format browser/tools/, a=automatic-formatting
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36048 --HG-- extra : source : fe526ac7e45be073f1074edeee508a22063bac4c
- Loading branch information
Victor Porof
committed
Jul 5, 2019
1 parent
af7d1d3
commit 6456074
Showing
24 changed files
with
857 additions
and
378 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,14 @@ | |
|
||
"use strict"; | ||
|
||
const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIChromeRegistry); | ||
const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment); | ||
const EXTENSION_DIR = "chrome://mochitests/content/browser/browser/tools/mozscreenshots/mozscreenshots/extension/mozscreenshots/browser/"; | ||
const chromeRegistry = Cc["@mozilla.org/chrome/chrome-registry;1"].getService( | ||
Ci.nsIChromeRegistry | ||
); | ||
const env = Cc["@mozilla.org/process/environment;1"].getService( | ||
Ci.nsIEnvironment | ||
); | ||
const EXTENSION_DIR = | ||
"chrome://mochitests/content/browser/browser/tools/mozscreenshots/mozscreenshots/extension/mozscreenshots/browser/"; | ||
|
||
let TestRunner; | ||
|
||
|
@@ -22,14 +27,19 @@ async function setup() { | |
|
||
info("installing extension temporarily"); | ||
let chromeURL = Services.io.newURI(EXTENSION_DIR); | ||
let dir = chromeRegistry.convertChromeURL(chromeURL).QueryInterface(Ci.nsIFileURL).file; | ||
let dir = chromeRegistry | ||
.convertChromeURL(chromeURL) | ||
.QueryInterface(Ci.nsIFileURL).file; | ||
await AddonManager.installTemporaryAddon(dir); | ||
|
||
info("Checking for mozscreenshots extension"); | ||
return new Promise(async (resolve) => { | ||
return new Promise(async resolve => { | ||
let aAddon = await AddonManager.getAddonByID("[email protected]"); | ||
isnot(aAddon, null, "The mozscreenshots extension should be installed"); | ||
TestRunner = ChromeUtils.import("resource://mozscreenshots/TestRunner.jsm", {}).TestRunner; | ||
TestRunner = ChromeUtils.import( | ||
"resource://mozscreenshots/TestRunner.jsm", | ||
{} | ||
).TestRunner; | ||
TestRunner.initTest(this); | ||
resolve(); | ||
}); | ||
|
@@ -42,8 +52,11 @@ async function setup() { | |
*/ | ||
function shouldCapture() { | ||
if (env.get("MOZSCREENSHOTS_SETS")) { | ||
ok(true, "MOZSCREENSHOTS_SETS was specified so only capture what was " + | ||
"requested (in browser_screenshots.js)"); | ||
ok( | ||
true, | ||
"MOZSCREENSHOTS_SETS was specified so only capture what was " + | ||
"requested (in browser_screenshots.js)" | ||
); | ||
return false; | ||
} | ||
|
||
|
Oops, something went wrong.