diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /accessible/tests/mochitest/elm/test_shadowroot_subframe.html | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
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> |