--- a/devtools/client/shared/test/browser_telemetry_sidebar.js
+++ b/devtools/client/shared/test/browser_telemetry_sidebar.js
@@ -6,25 +6,43 @@
const TEST_URI = "data:text/html;charset=utf-8,<p>browser_telemetry_sidebar.js</p>";
const OPTOUT = Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTOUT;
// Because we need to gather stats for the period of time that a tool has been
// opened we make use of setTimeout() to create tool active times.
const TOOL_DELAY = 200;
+var animationPanelId;
+if (Services.prefs.getBoolPref("devtools.new-animationinspector.enabled")) {
+ animationPanelId = "newanimationinspector";
+} else {
+ animationPanelId = "animationinspector";
+}
+
const DATA = [
{
timestamp: null,
category: "devtools.main",
method: "sidepanel_changed",
object: "inspector",
value: null,
extra: {
oldpanel: "computedview",
+ newpanel: animationPanelId
+ }
+ },
+ {
+ timestamp: null,
+ category: "devtools.main",
+ method: "sidepanel_changed",
+ object: "inspector",
+ value: null,
+ extra: {
+ oldpanel: animationPanelId,
newpanel: "fontinspector"
}
},
{
timestamp: null,
category: "devtools.main",
method: "sidepanel_changed",
object: "inspector",
@@ -48,16 +66,27 @@ const DATA = [
{
timestamp: null,
category: "devtools.main",
method: "sidepanel_changed",
object: "inspector",
value: null,
extra: {
oldpanel: "computedview",
+ newpanel: animationPanelId
+ }
+ },
+ {
+ timestamp: null,
+ category: "devtools.main",
+ method: "sidepanel_changed",
+ object: "inspector",
+ value: null,
+ extra: {
+ oldpanel: animationPanelId,
newpanel: "fontinspector"
}
},
{
timestamp: null,
category: "devtools.main",
method: "sidepanel_changed",
object: "inspector",
@@ -103,17 +132,17 @@ add_task(async function() {
gBrowser.removeCurrentTab();
});
function testSidebar(toolbox) {
info("Testing sidebar");
const inspector = toolbox.getCurrentPanel();
let sidebarTools = ["computedview", "layoutview", "fontinspector",
- "animationinspector"];
+ animationPanelId];
// Concatenate the array with itself so that we can open each tool twice.
sidebarTools = [...sidebarTools, ...sidebarTools];
return new Promise(resolve => {
// See TOOL_DELAY for why we need setTimeout here
setTimeout(function selectSidebarTab() {
const tool = sidebarTools.pop();