diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /accessible/tests/mochitest/elm/test_shadowroot_subframe.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/tests/mochitest/elm/test_shadowroot_subframe.html')
-rw-r--r-- | accessible/tests/mochitest/elm/test_shadowroot_subframe.html | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/accessible/tests/mochitest/elm/test_shadowroot_subframe.html b/accessible/tests/mochitest/elm/test_shadowroot_subframe.html new file mode 100644 index 0000000000..20e2baf681 --- /dev/null +++ b/accessible/tests/mochitest/elm/test_shadowroot_subframe.html @@ -0,0 +1,68 @@ +<!DOCTYPE HTML> +<html> +<head> + <title>ShadowRoot tests</title> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> + <script type="application/javascript" src="../common.js"></script> + <script type="application/javascript" src="../role.js"></script> + + <script type="application/javascript"> + let SimpleTest = window.parent.SimpleTest; + let ok = window.parent.ok; + let is = window.parent.is; + + function doTest() { + testElm("component", { + role: ROLE_GROUPING, + children: [ + { + role: ROLE_PUSHBUTTON, + }, + { + role: ROLE_LINK, + }, + ], + }); + + // Shadow root boundary between table and row + testElm("table", { + role: ROLE_TABLE, + children: [ + { + role: ROLE_ROW, + }, + ], + }); + + SimpleTest.finish(); + } + + addA11yLoadEvent(doTest); + </script> + +</head> +<body> + <div role="group" id="component"></div> + <div id="table" role="table" style="display: table;"></div> + + <script> + var component = document.getElementById("component"); + var shadow = component.attachShadow({mode: "open"}); + + var button = document.createElement("button"); + button.append("Hello"); + + var a = document.createElement("a"); + a.setAttribute("href", "#"); + a.append(" World"); + + shadow.appendChild(button); + shadow.appendChild(a); + + var table = document.getElementById("table"); + shadow = table.attachShadow({mode: "open"}); + shadow.innerHTML = "<div style='display: table-row' role='row'>" + + "<div style='display: table-cell' role='cell'>hi</div>" + + "</div>"; + </script> +</body> |