Bug 1633102 - Move mozscreenshots m-bc tests to their own subdirectory. a=test-only
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Sat, 25 Apr 2020 17:37:10 +0000
changeset 526085 1e630c8bc496a109c7eb2b57471a52cf9acce278
parent 526084 610d7d4d10c3e84c74c56919010229a1cf05eafd
child 526086 1247c4bbb03988aba7329e4676257ec916cf487d
push id37350
push usernbeleuzu@mozilla.com
push dateSun, 26 Apr 2020 09:43:12 +0000
treeherdermozilla-central@21659f178a12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs1633102
milestone77.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 1633102 - Move mozscreenshots m-bc tests to their own subdirectory. a=test-only Make them easier to run alone without running all the capture subdirectories. Differential Revision: https://phabricator.services.mozilla.com/D72516
browser/tools/mozscreenshots/browser.ini
browser/tools/mozscreenshots/browser_boundingbox.js
browser/tools/mozscreenshots/browser_screenshots.js
browser/tools/mozscreenshots/browser_screenshots_cropping.js
browser/tools/mozscreenshots/moz.build
browser/tools/mozscreenshots/tests/browser/browser.ini
browser/tools/mozscreenshots/tests/browser/browser_boundingbox.js
browser/tools/mozscreenshots/tests/browser/browser_screenshots.js
browser/tools/mozscreenshots/tests/browser/browser_screenshots_cropping.js
--- a/browser/tools/mozscreenshots/moz.build
+++ b/browser/tools/mozscreenshots/moz.build
@@ -17,21 +17,21 @@ with Files("permissionPrompts/**"):
     BUG_COMPONENT = ("Firefox", "Site Permissions")
 
 with Files("preferences/**"):
     BUG_COMPONENT = ("Firefox", "Preferences")
 
 BROWSER_CHROME_MANIFESTS += [
     # Each test is in it's own directory so it gets run in a clean profile with
     # run-by-dir.
-    'browser.ini',
     'controlCenter/browser.ini',
     'devtools/browser.ini',
     'permissionPrompts/browser.ini',
     'preferences/browser.ini',
     'primaryUI/browser.ini',
+    'tests/browser/browser.ini',
 ]
 
 TEST_DIRS += [
     'mozscreenshots/extension',
 ]
 
 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
rename from browser/tools/mozscreenshots/browser.ini
rename to browser/tools/mozscreenshots/tests/browser/browser.ini
--- a/browser/tools/mozscreenshots/browser.ini
+++ b/browser/tools/mozscreenshots/tests/browser/browser.ini
@@ -1,8 +1,8 @@
 [DEFAULT]
 subsuite = screenshots
 support-files =
-  head.js
+  ../../head.js
 
 [browser_screenshots.js]
 [browser_screenshots_cropping.js]
 [browser_boundingbox.js]
rename from browser/tools/mozscreenshots/browser_boundingbox.js
rename to browser/tools/mozscreenshots/tests/browser/browser_boundingbox.js
--- a/browser/tools/mozscreenshots/browser_boundingbox.js
+++ b/browser/tools/mozscreenshots/tests/browser/browser_boundingbox.js
@@ -1,14 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 "use strict";
 
+/* import-globals-from ../../head.js */
+
 add_task(async function() {
   const scale = window.docShell.QueryInterface(Ci.nsIBaseWindow)
     .devicePixelsPerDesktopPixel;
   let { bounds, rects } = TestRunner._findBoundingBox(["#tabbrowser-tabs"]);
   let tabBar = document.querySelector("#tabbrowser-tabs");
   let tabBarRect = tabBar.getBoundingClientRect();
 
   // Calculate expected values
rename from browser/tools/mozscreenshots/browser_screenshots.js
rename to browser/tools/mozscreenshots/tests/browser/browser_screenshots.js
--- a/browser/tools/mozscreenshots/browser_screenshots.js
+++ b/browser/tools/mozscreenshots/tests/browser/browser_screenshots.js
@@ -1,14 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
+/* import-globals-from ../../head.js */
+
 add_task(async function capture() {
   let setsEnv = env.get("MOZSCREENSHOTS_SETS");
   if (!setsEnv) {
     ok(
       true,
       "MOZSCREENSHOTS_SETS wasn't specified so there's nothing to capture"
     );
     return;
rename from browser/tools/mozscreenshots/browser_screenshots_cropping.js
rename to browser/tools/mozscreenshots/tests/browser/browser_screenshots_cropping.js
--- a/browser/tools/mozscreenshots/browser_screenshots_cropping.js
+++ b/browser/tools/mozscreenshots/tests/browser/browser_screenshots_cropping.js
@@ -1,14 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
+/* import-globals-from ../../head.js */
+
 ChromeUtils.import("resource://gre/modules/Geometry.jsm", this);
 
 async function draw(window, src) {
   const { document, Image } = window;
 
   const promise = new Promise((resolve, reject) => {
     const img = new Image();