summaryrefslogtreecommitdiffstats
path: root/devtools/client/performance/test/browser_perf-recording-notices-05.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /devtools/client/performance/test/browser_perf-recording-notices-05.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/performance/test/browser_perf-recording-notices-05.js')
-rw-r--r--devtools/client/performance/test/browser_perf-recording-notices-05.js54
1 files changed, 54 insertions, 0 deletions
diff --git a/devtools/client/performance/test/browser_perf-recording-notices-05.js b/devtools/client/performance/test/browser_perf-recording-notices-05.js
new file mode 100644
index 000000000..b6267470d
--- /dev/null
+++ b/devtools/client/performance/test/browser_perf-recording-notices-05.js
@@ -0,0 +1,54 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+/**
+ * Tests that the circular buffer notices work when e10s is on/off.
+ */
+
+const { SIMPLE_URL } = require("devtools/client/performance/test/helpers/urls");
+const { initPerformanceInNewTab, teardownToolboxAndRemoveTab } = require("devtools/client/performance/test/helpers/panel-utils");
+
+add_task(function* () {
+ let { panel } = yield initPerformanceInNewTab({
+ url: SIMPLE_URL,
+ win: window
+ });
+
+ let { gFront, $, PerformanceController } = panel.panelWin;
+
+ // Set a fast profiler-status update interval
+ yield gFront.setProfilerStatusInterval(10);
+
+ let supported = false;
+ let enabled = false;
+
+ PerformanceController.getMultiprocessStatus = () => {
+ return { supported, enabled };
+ };
+
+ PerformanceController._setMultiprocessAttributes();
+ ok($("#performance-view").getAttribute("e10s"), "unsupported",
+ "When e10s is disabled and no option to turn on, container has [e10s=unsupported].");
+
+ supported = true;
+ enabled = false;
+ PerformanceController._setMultiprocessAttributes();
+ ok($("#performance-view").getAttribute("e10s"), "disabled",
+ "When e10s is disabled and but is supported, container has [e10s=disabled].");
+
+ supported = false;
+ enabled = true;
+ PerformanceController._setMultiprocessAttributes();
+ ok($("#performance-view").getAttribute("e10s"), "",
+ "When e10s is enabled, but not supported, this probably means we no longer have " +
+ "E10S_TESTING_ONLY, and we have no e10s attribute.");
+
+ supported = true;
+ enabled = true;
+ PerformanceController._setMultiprocessAttributes();
+ ok($("#performance-view").getAttribute("e10s"), "",
+ "When e10s is enabled and supported, there should be no e10s attribute.");
+
+ yield teardownToolboxAndRemoveTab(panel);
+});