Bug 1532993 - Add test for perfomance panel when devtools are in frame type=content r=ochameau
☠☠ backed out by 54e502f0f78e ☠ ☠
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 11 Apr 2019 10:06:57 +0000
changeset 468976 f7050f15a28dbe22ef9f0f73a9778db0da794fbe
parent 468975 f1615630af59478b0c08764d96e3268b2cbeeeb8
child 468977 119fa544fa307bdbc2a802bfd51862e5cee43fcc
push id35856
push usercsabou@mozilla.com
push dateFri, 12 Apr 2019 03:19:48 +0000
treeherdermozilla-central@940684cd1065 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1532993, 1538731
milestone68.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 1532993 - Add test for perfomance panel when devtools are in frame type=content r=ochameau Depends on D26919 This test also needs the fixes from Bug 1538731 Differential Revision: https://phabricator.services.mozilla.com/D26920
devtools/client/aboutdebugging-new/test/browser/browser.ini
devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_performance.js
--- a/devtools/client/aboutdebugging-new/test/browser/browser.ini
+++ b/devtools/client/aboutdebugging-new/test/browser/browser.ini
@@ -51,16 +51,17 @@ skip-if = (os == 'linux' && bits == 32) 
 [browser_aboutdebugging_debug-target-pane_collapsibilities_interaction.js]
 [browser_aboutdebugging_debug-target-pane_collapsibilities_preference.js]
 [browser_aboutdebugging_debug-target-pane_empty.js]
 [browser_aboutdebugging_debug-target-pane_usb_runtime.js]
 [browser_aboutdebugging_devtools.js]
 [browser_aboutdebugging_devtoolstoolbox_contextmenu.js]
 [browser_aboutdebugging_devtoolstoolbox_contextmenu_markupview.js]
 [browser_aboutdebugging_devtoolstoolbox_menubar.js]
+[browser_aboutdebugging_devtoolstoolbox_performance.js]
 [browser_aboutdebugging_devtoolstoolbox_reload.js]
 [browser_aboutdebugging_devtoolstoolbox_shortcuts.js]
 skip-if = (os == "win" && ccov) # Bug 1521349
 [browser_aboutdebugging_devtoolstoolbox_target_destroyed.js]
 skip-if = debug || asan # This test leaks. See bug 1529005
 [browser_aboutdebugging_devtoolstoolbox_tooltip_markupview.js]
 [browser_aboutdebugging_navigate.js]
 [browser_aboutdebugging_persist_connection.js]
new file mode 100644
--- /dev/null
+++ b/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_devtoolstoolbox_performance.js
@@ -0,0 +1,53 @@
+/* Any copyright is dedicated to the Public Domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// This test can take a long time to run on debug builds.
+requestLongerTimeout(2);
+
+/* import-globals-from helper-collapsibilities.js */
+Services.scriptloader.loadSubScript(CHROME_URL_ROOT + "helper-collapsibilities.js", this);
+
+/**
+ * Check that graphs used by the old performance panel are correctly displayed.
+ */
+add_task(async function() {
+  info("Force all debug target panes to be expanded");
+  prepareCollapsibilitiesTest();
+
+  info("Force old performance panel");
+  await pushPref("devtools.performance.new-panel-enabled", false);
+
+  const { document, tab, window } = await openAboutDebugging();
+  await selectThisFirefoxPage(document, window.AboutDebugging.store);
+  const { devtoolsTab, devtoolsWindow } =
+    await openAboutDevtoolsToolbox(document, tab, window);
+
+  info("Select performance panel");
+  const toolbox = getToolbox(devtoolsWindow);
+  await toolbox.selectTool("performance");
+
+  // Retrieve shared helpers for the old performance panel.
+  const { startRecording, stopRecording } =
+    require("devtools/client/performance/test/helpers/actions");
+  const performancePanel = toolbox.getCurrentPanel();
+  await startRecording(performancePanel);
+
+  const { idleWait } = require("devtools/client/performance/test/helpers/wait-utils");
+  await idleWait(100);
+
+  info("Stop recording");
+  await stopRecording(performancePanel);
+
+  info("Select the call tree");
+  const { EVENTS, DetailsView, JsCallTreeView } = performancePanel.panelWin;
+  const rendered = once(JsCallTreeView, EVENTS.UI_JS_CALL_TREE_RENDERED);
+  await DetailsView.selectView("js-calltree");
+
+  info("Wait for the call tree to be rendered");
+  await rendered;
+
+  await closeAboutDevtoolsToolbox(document, devtoolsTab, window);
+  await removeTab(tab);
+});