Bug 1500072 - Add metrics test for netmonitor;r=ochameau
☠☠ backed out by a3ef08e9f99e ☠ ☠
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 13 Feb 2019 10:04:34 +0000
changeset 458867 7cb353ea123d
parent 458866 9d792d03c36b
child 458868 e381b765ee73
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1500072
milestone67.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 1500072 - Add metrics test for netmonitor;r=ochameau Depends on D19638 Differential Revision: https://phabricator.services.mozilla.com/D19639
devtools/client/framework/moz.build
devtools/client/framework/test/metrics/browser_metrics_netmonitor.ini
devtools/client/framework/test/metrics/browser_metrics_netmonitor.js
--- a/devtools/client/framework/moz.build
+++ b/devtools/client/framework/moz.build
@@ -2,16 +2,17 @@
 # vim: set filetype=python:
 # 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/.
 
 BROWSER_CHROME_MANIFESTS += [
     'test/browser.ini',
     'test/metrics/browser_metrics_inspector.ini',
+    'test/metrics/browser_metrics_netmonitor.ini',
     'test/metrics/browser_metrics_webconsole.ini',
 ]
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 
 DIRS += [
     'components',
 ]
 
copy from devtools/client/framework/test/metrics/browser_metrics_webconsole.ini
copy to devtools/client/framework/test/metrics/browser_metrics_netmonitor.ini
--- a/devtools/client/framework/test/metrics/browser_metrics_webconsole.ini
+++ b/devtools/client/framework/test/metrics/browser_metrics_netmonitor.ini
@@ -3,10 +3,10 @@ tags = devtools
 subsuite = devtools
 support-files =
   head.js
   !/devtools/client/shared/test/shared-head.js
   !/devtools/client/shared/test/telemetry-test-helpers.js
 
 # Each metrics tests is loaded in a separate .ini file. This way the test is executed
 # individually, without any other test being executed before or after.
-[browser_metrics_webconsole.js]
+[browser_metrics_netmonitor.js]
 skip-if = os != 'linux' || debug || asan # Results should be platform agnostic - only run on linux64-opt
copy from devtools/client/framework/test/metrics/browser_metrics_webconsole.js
copy to devtools/client/framework/test/metrics/browser_metrics_netmonitor.js
--- a/devtools/client/framework/test/metrics/browser_metrics_webconsole.js
+++ b/devtools/client/framework/test/metrics/browser_metrics_netmonitor.js
@@ -4,28 +4,28 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 /* import-globals-from ../../../shared/test/shared-head.js */
 
 /**
  * This test records the number of modules loaded by DevTools, as well as the total count
- * of characters in those modules, when opening the webconsole. These metrics are
+ * of characters in those modules, when opening the netmonitor. These metrics are
  * retrieved by perfherder via logs.
  */
 
-const TEST_URL = "data:text/html;charset=UTF-8,<div>Webconsole modules load test</div>";
+const TEST_URL = "data:text/html;charset=UTF-8,<div>Netmonitor modules load test</div>";
 
 add_task(async function() {
-  const toolbox = await openNewTabAndToolbox(TEST_URL, "webconsole");
+  const toolbox = await openNewTabAndToolbox(TEST_URL, "netmonitor");
   const panel = toolbox.getCurrentPanel();
 
-  // Retrieve the browser loader dedicated to the WebConsole.
-  const webconsoleLoader = panel._frameWindow.getBrowserLoaderForWindow();
-  const loaders = [loader.provider.loader, webconsoleLoader.loader];
+  // Retrieve the browser loader dedicated to the Netmonitor.
+  const netmonitorLoader = panel.panelWin.getBrowserLoaderForWindow();
+  const loaders = [loader.provider.loader, netmonitorLoader.loader];
 
   runMetricsTest({
-    filterString: "devtools/client/webconsole",
+    filterString: "devtools/client/netmonitor",
     loaders,
-    panelName: "webconsole",
+    panelName: "netmonitor",
   });
 });