summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/markup/test/browser_markup_links_07.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /devtools/client/inspector/markup/test/browser_markup_links_07.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/inspector/markup/test/browser_markup_links_07.js')
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_07.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_07.js b/devtools/client/inspector/markup/test/browser_markup_links_07.js
index 2a86f3b1d9..830d370b03 100644
--- a/devtools/client/inspector/markup/test/browser_markup_links_07.js
+++ b/devtools/client/inspector/markup/test/browser_markup_links_07.js
@@ -7,6 +7,7 @@
// do follows the link.
const TEST_URL = URL_ROOT_SSL + "doc_markup_links.html";
+const TEST_URL_BASE = URL_ROOT_SSL + "resources/doc_markup_links_base.html";
add_task(async function () {
const { inspector } = await openInspectorForURL(TEST_URL);
@@ -70,6 +71,31 @@ add_task(async function () {
await followLinkNoNewNode(linkEl, true, inspector);
});
+add_task(async function testDocumentWithBaseAttribute() {
+ const { inspector } = await openInspectorForURL(TEST_URL_BASE);
+
+ info("Select a node with a URI attribute");
+ await selectNode("img", inspector);
+
+ info("Find the link element from the markup-view");
+ const { editor } = await getContainerForSelector("img", inspector);
+ const linkEl = editor.attrElements.get("src").querySelector(".link");
+
+ info("Follow the link with middle-click and wait for the new tab to open");
+ await followLinkWaitForTab(
+ linkEl,
+ false,
+ URL_ROOT_SSL + "doc_markup_tooltip.png"
+ );
+
+ info("Follow the link with meta/ctrl-click and wait for the new tab to open");
+ await followLinkWaitForTab(
+ linkEl,
+ true,
+ URL_ROOT_SSL + "doc_markup_tooltip.png"
+ );
+});
+
function performMouseDown(linkEl, metactrl) {
const evt = linkEl.ownerDocument.createEvent("MouseEvents");