From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../test/browser_perf-recording-notices-05.js | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 devtools/client/performance/test/browser_perf-recording-notices-05.js (limited to 'devtools/client/performance/test/browser_perf-recording-notices-05.js') 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); +}); -- cgit v1.2.3