summaryrefslogtreecommitdiffstats
path: root/devtools/client/framework/test
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/framework/test')
-rw-r--r--devtools/client/framework/test/browser.toml3
-rw-r--r--devtools/client/framework/test/browser_toolbox_many_toggles.js50
-rw-r--r--devtools/client/framework/test/node/README.md2
3 files changed, 54 insertions, 1 deletions
diff --git a/devtools/client/framework/test/browser.toml b/devtools/client/framework/test/browser.toml
index e7d979ebb3..c0faa66301 100644
--- a/devtools/client/framework/test/browser.toml
+++ b/devtools/client/framework/test/browser.toml
@@ -183,6 +183,9 @@ skip-if = [
"http2",
]
+["browser_toolbox_many_toggles.js"]
+skip-if = ["os == 'win'"] # Content process killing throws on Window
+
["browser_toolbox_meatball.js"]
["browser_toolbox_options.js"]
diff --git a/devtools/client/framework/test/browser_toolbox_many_toggles.js b/devtools/client/framework/test/browser_toolbox_many_toggles.js
new file mode 100644
index 0000000000..1841ce1874
--- /dev/null
+++ b/devtools/client/framework/test/browser_toolbox_many_toggles.js
@@ -0,0 +1,50 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Bug 1898490: DevTools may prevents opening when some random content process is being destroyed
+// in middle of DevTools initialization.
+// So try opening DevTools a couple of times while destroying content processes in the background.
+
+const URL =
+ "data:text/html;charset=utf8,test many toggles with other content process destructions";
+
+add_task(async function () {
+ const tab = await addTab(URL);
+
+ const ProcessTools = Cc["@mozilla.org/processtools-service;1"].getService(
+ Ci.nsIProcessToolsService
+ );
+
+ const openedTabs = [];
+ const interval = setInterval(() => {
+ // Close the process specific to about:home, which is using a privilegedabout process type
+ const pid = ChromeUtils.getAllDOMProcesses().filter(
+ r => r.remoteType == "privilegedabout"
+ )[0]?.osPid;
+ if (!pid) {
+ return;
+ }
+ ProcessTools.kill(pid);
+ // The privilegedabout process wouldn't be automatically re-created, so open a new tab to force creating a new process.
+ openedTabs.push(BrowserTestUtils.addTab(gBrowser, "about:home"));
+ });
+
+ info(
+ "Open/close DevTools many times in a row while some processes get destroyed"
+ );
+ for (let i = 0; i < 5; i++) {
+ const toolbox = await gDevTools.showToolboxForTab(tab, {
+ toolId: "webconsole",
+ });
+ await toolbox.destroy();
+ }
+
+ clearInterval(interval);
+
+ info("Close all tabs that were used to spawn a new content process");
+ for (const tab of openedTabs) {
+ await removeTab(tab);
+ }
+});
diff --git a/devtools/client/framework/test/node/README.md b/devtools/client/framework/test/node/README.md
index 9fb86edfc5..6530aaf873 100644
--- a/devtools/client/framework/test/node/README.md
+++ b/devtools/client/framework/test/node/README.md
@@ -19,4 +19,4 @@ The tests run on try on linux64 platforms. The complete name of the try job is `
Adding the tests to a try push depends on the try selector you are using.
- try fuzzy: look for the job named `source-test-node-devtools-tests`
-The configuration file for try can be found at `taskcluster/ci/source-test/node.yml`
+The configuration file for try can be found at `taskcluster/kinds/source-test/node.yml`