Files
sousa-gecko/testing/web-platform/tests/mathml/relations/html5-tree/href-navigation.html
T
tannal 6bdbdd1a2a Bug 2050394 [wpt PR 60892] - [mathml] Implement target and hyperlinkutils for MathML a element, a=testonly
Automatic update from web-platform-tests
[mathml] Implement target and hyperlinkutils for MathML a element

Adds wpt tests for href and target attributes

Adds wpt tests for HyperlinkUtils mixin for mathml a element

Bug: 510487697
Change-Id: I1cede1a6d1c76f25562f696454cd977673e58b85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7970997
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Frédéric Wang Nélar <fwang@igalia.com>
Commit-Queue: Frédéric Wang Nélar <fwang@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1652445}

--

wpt-commits: 6f870302908fb5a3b9e40e865c049ece2a29a557
wpt-pr: 60892
2026-07-06 08:45:45 +00:00

24 lines
955 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>MathMLAnchorElement href target navigation test</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<math>
<a href="support/target.html?success" target="_blank">
<mtext>Click Me</mtext>
</a>
</math>
<script>
promise_test(async t => {
const channel = new BroadcastChannel('mathml_nav_test');
const messageReceived = new Promise(resolve => { channel.onmessage = e => resolve(e) });
const a = document.querySelector('a')
a.dispatchEvent(new MouseEvent('click', {bubbles: true, cancelable: true}));
const message = await messageReceived;
channel.close();
const expected = new URL("support/target.html?success", window.location.href).href;
assert_equals(event.data, expected, "The new window should report the correct URL");
}, "Test MathMLAnchorElement _blank navigation via BroadcastChannel");
</script>
</body>