Bug 1445825: Enable new animation inspector in nightly. r=gl
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Mon, 26 Mar 2018 17:00:39 +0900
changeset 410316 10822bd8767d98e194b6de36b3bd7d0e819f9252
parent 410315 b9de00749ad97c4dc013d3973fc1de137009fb5b
child 410317 faf07de20517f15a37883c709c9fe9920c5a7dd5
push id61802
push userdakatsuka@mozilla.com
push dateTue, 27 Mar 2018 23:16:24 +0000
treeherderautoland@10822bd8767d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1445825
milestone61.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 1445825: Enable new animation inspector in nightly. r=gl MozReview-Commit-ID: LrjeVNrzsGe
devtools/client/animationinspector/test/head.js
devtools/client/inspector/animation/test/head.js
devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js
devtools/client/preferences/devtools.js
--- a/devtools/client/animationinspector/test/head.js
+++ b/devtools/client/animationinspector/test/head.js
@@ -20,19 +20,23 @@ const ANIMATION_L10N =
 registerCleanupFunction(async function() {
   await closeAnimationInspector();
 
   while (gBrowser.tabs.length > 1) {
     gBrowser.removeCurrentTab();
   }
 });
 
+// Disable new animation inspector.
+Services.prefs.setBoolPref("devtools.new-animationinspector.enabled", false);
+
 // Clean-up all prefs that might have been changed during a test run
 // (safer here because if the test fails, then the pref is never reverted)
 registerCleanupFunction(() => {
+  Services.prefs.clearUserPref("devtools.new-animationinspector.enabled");
   Services.prefs.clearUserPref("devtools.debugger.log");
 });
 
 // Some animation features are not enabled by default in release/beta channels
 // yet including:
 // * parts of the Web Animations API (Bug 1264101), and
 // * the frames() timing function (Bug 1379582).
 function enableAnimationFeatures() {
--- a/devtools/client/inspector/animation/test/head.js
+++ b/devtools/client/inspector/animation/test/head.js
@@ -10,24 +10,20 @@ Services.scriptloader.loadSubScript(
   "chrome://mochitests/content/browser/devtools/client/inspector/test/head.js", this);
 
 const FRAME_SCRIPT_URL = CHROME_URL_ROOT + "doc_frame_script.js";
 const TAB_NAME = "newanimationinspector";
 
 const ANIMATION_L10N =
   new LocalizationHelper("devtools/client/locales/animationinspector.properties");
 
-// Enable new animation inspector.
-Services.prefs.setBoolPref("devtools.new-animationinspector.enabled", true);
-
 // Auto clean-up when a test ends.
 // Clean-up all prefs that might have been changed during a test run
 // (safer here because if the test fails, then the pref is never reverted)
 registerCleanupFunction(() => {
-  Services.prefs.clearUserPref("devtools.new-animationinspector.enabled");
   Services.prefs.clearUserPref("devtools.toolsidebar-width.inspector");
 });
 
 /**
  * Open the toolbox, with the inspector tool visible and the animationinspector
  * sidebar selected.
  *
  * @return {Promise} that resolves when the inspector is ready.
--- a/devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js
+++ b/devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js
@@ -50,19 +50,24 @@ add_task(async function() {
   await onHidden;
   info("previous tooltip hidden");
 
   await onShown;
   info("event tooltip for the second div is shown");
 
   info("Click on the animation inspector tab");
   let onHighlighterHidden = toolbox.once("node-unhighlight");
-  let onTabInspectorSelected = inspector.sidebar.once("animationinspector-selected");
-  let animationInspectorTab = inspector.panelDoc.querySelector("#animationinspector-tab");
+  let onTabInspectorSelected = inspector.sidebar.once("newanimationinspector-selected");
+  let onInspectorUpdated = inspector.once("inspector-updated");
+  let animationInspectorTab =
+    inspector.panelDoc.querySelector("#newanimationinspector-tab");
   EventUtils.synthesizeMouseAtCenter(animationInspectorTab, {},
     inspector.panelDoc.defaultView);
 
   await onTabInspectorSelected;
   info("animation inspector was selected");
 
+  await onInspectorUpdated;
+  info("animation inspector was updated");
+
   await onHighlighterHidden;
   info("box model highlighter hidden after moving the mouse out of the markup view");
 });
--- a/devtools/client/preferences/devtools.js
+++ b/devtools/client/preferences/devtools.js
@@ -67,18 +67,22 @@ pref("devtools.inspector.flexboxHighligh
 // Enable the CSS shapes highlighter
 pref("devtools.inspector.shapesHighlighter.enabled", true);
 // Enable the Changes View
 pref("devtools.changesview.enabled", false);
 // Enable the Events View
 pref("devtools.eventsview.enabled", false);
 // Enable the Flexbox Inspector panel
 pref("devtools.flexboxinspector.enabled", false);
-// Enable the new Animation Inspector
+// Enable the new Animation Inspector in Nightly only
+#if defined(NIGHTLY_BUILD)
+pref("devtools.new-animationinspector.enabled", true);
+#else
 pref("devtools.new-animationinspector.enabled", false);
+#endif
 // Enable the Variable Fonts editor
 pref("devtools.inspector.fonteditor.enabled", false);
 
 // Grid highlighter preferences
 pref("devtools.gridinspector.gridOutlineMaxColumns", 50);
 pref("devtools.gridinspector.gridOutlineMaxRows", 50);
 pref("devtools.gridinspector.showGridAreas", false);
 pref("devtools.gridinspector.showGridLineNumbers", false);