Bug 1532993 - Add test for perfomance panel when devtools are in frame type=content r=ochameau
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 12 Apr 2019 07:34:13 +0000
changeset 469246 5e86cf625b5407912d483908286f464c6037ec63
parent 469245 7bd34721fb35f036eb119d42593fa22c9ad09d91
child 469247 fc8e9758009c4e4cf9fbcd8750b1e1c0cadc14a4
push id112776
push usershindli@mozilla.com
push dateFri, 12 Apr 2019 16:20:17 +0000
treeherdermozilla-inbound@b4501ced5619 [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
@@ -52,16 +52,17 @@ skip-if = (os == 'linux' && bits == 32) 
 [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_focus.js]
 [browser_aboutdebugging_devtoolstoolbox_menubar.js]
+[browser_aboutdebugging_devtoolstoolbox_performance.js]
 [browser_aboutdebugging_devtoolstoolbox_reload.js]
 skip-if = verify # test loads the toolbox 2 times for each panel, might timeout or OOM
 [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]
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);
+});