summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/test
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/inspector/test')
-rw-r--r--devtools/client/inspector/test/browser_inspector_highlighter-cssshape_offset-path.js1
-rw-r--r--devtools/client/inspector/test/browser_inspector_inspect_loading_document.js11
-rw-r--r--devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js20
-rw-r--r--devtools/client/inspector/test/browser_inspector_search-filter_context-menu.js12
4 files changed, 34 insertions, 10 deletions
diff --git a/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_offset-path.js b/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_offset-path.js
index 004d7e945f..bb187db4f5 100644
--- a/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_offset-path.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-cssshape_offset-path.js
@@ -38,7 +38,6 @@ const TEST_URL = `data:text/html,<meta charset=utf8>${encodeURIComponent(`
const HIGHLIGHTER_TYPE = "ShapesHighlighter";
add_task(async function () {
- await pushPref("layout.css.motion-path-basic-shapes.enabled", true);
const env = await openInspectorForURL(TEST_URL);
const { highlighterTestFront, inspector } = env;
const view = selectRuleView(inspector);
diff --git a/devtools/client/inspector/test/browser_inspector_inspect_loading_document.js b/devtools/client/inspector/test/browser_inspector_inspect_loading_document.js
index 6798c85394..11e67ff4cd 100644
--- a/devtools/client/inspector/test/browser_inspector_inspect_loading_document.js
+++ b/devtools/client/inspector/test/browser_inspector_inspect_loading_document.js
@@ -131,6 +131,10 @@ add_task(async function testSlowLoadingDocument() {
// Navigate to about:blank to clean the state.
await navigateTo("about:blank");
+ const markuploaded = inspector.once("markuploaded");
+ const onNewRoot = inspector.once("new-root");
+ const onUpdated = inspector.once("inspector-updated");
+
await navigateTo(TEST_URL_2, { waitForLoad: false });
info("Wait for the #start div to be available as a markupview container");
await TestUtils.waitForCondition(async () => {
@@ -165,4 +169,11 @@ add_task(async function testSlowLoadingDocument() {
"body",
inspector
);
+
+ info(
+ "Waiting for inspector to update after having released the document load"
+ );
+ await markuploaded;
+ await onNewRoot;
+ await onUpdated;
});
diff --git a/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js b/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js
index ac6ae35ad1..bd655a9a96 100644
--- a/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js
+++ b/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js
@@ -11,9 +11,17 @@ add_task(async function () {
// requests to evaluateJSAsync.
await pushPref("devtools.webconsole.input.eagerEvaluation", false);
- const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+ info("Testing 'Use in Console' menu item with enabled split console.");
+ await pushPref("devtools.toolbox.splitconsole.enabled", true);
+ await testConsoleFunctionality({ isSplitConsoleEnabled: true });
+
+ info("Testing 'Use in Console' menu item with disabled split console.");
+ await pushPref("devtools.toolbox.splitconsole.enabled", false);
+ await testConsoleFunctionality({ isSplitConsoleEnabled: false });
+});
- info("Testing 'Use in Console' menu item.");
+async function testConsoleFunctionality({ isSplitConsoleEnabled }) {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
await selectNode("#console-var", inspector);
const container = await getContainerForSelector("#console-var", inspector);
@@ -27,6 +35,12 @@ add_task(async function () {
const hud = toolbox.getPanel("webconsole").hud;
+ if (isSplitConsoleEnabled) {
+ ok(toolbox.splitConsole, "The console is split console.");
+ } else {
+ ok(!toolbox.splitConsole, "The console is Web Console tab.");
+ }
+
const getConsoleResults = () => hud.ui.outputNode.querySelectorAll(".result");
is(hud.getInputValue(), "temp0", "first console variable is named temp0");
@@ -54,4 +68,4 @@ add_task(async function () {
);
hud.ui.wrapper.dispatchClearHistory();
-});
+}
diff --git a/devtools/client/inspector/test/browser_inspector_search-filter_context-menu.js b/devtools/client/inspector/test/browser_inspector_search-filter_context-menu.js
index dad2ffa0b8..e8392b1425 100644
--- a/devtools/client/inspector/test/browser_inspector_search-filter_context-menu.js
+++ b/devtools/client/inspector/test/browser_inspector_search-filter_context-menu.js
@@ -96,12 +96,12 @@ add_task(async function () {
cmdCopy = searchContextMenu.querySelector("#editmenu-copy");
cmdPaste = searchContextMenu.querySelector("#editmenu-paste");
- is(cmdUndo.getAttribute("disabled"), "", "cmdUndo is enabled");
- is(cmdDelete.getAttribute("disabled"), "", "cmdDelete is enabled");
- is(cmdSelectAll.getAttribute("disabled"), "", "cmdSelectAll is enabled");
- is(cmdCut.getAttribute("disabled"), "", "cmdCut is enabled");
- is(cmdCopy.getAttribute("disabled"), "", "cmdCopy is enabled");
- is(cmdPaste.getAttribute("disabled"), "", "cmdPaste is enabled");
+ is(cmdUndo.getAttribute("disabled"), null, "cmdUndo is enabled");
+ is(cmdDelete.getAttribute("disabled"), null, "cmdDelete is enabled");
+ is(cmdSelectAll.getAttribute("disabled"), null, "cmdSelectAll is enabled");
+ is(cmdCut.getAttribute("disabled"), null, "cmdCut is enabled");
+ is(cmdCopy.getAttribute("disabled"), null, "cmdCopy is enabled");
+ is(cmdPaste.getAttribute("disabled"), null, "cmdPaste is enabled");
const onContextMenuHidden = toolbox.once("menu-close");
searchContextMenu.hidePopup();