Bug 1445825: Enable new animation inspector in nightly. r?gl
MozReview-Commit-ID: LrjeVNrzsGe
--- 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);