1
0
Fork 0
firefox/testing/web-platform/tests/mathml/relations/css-styling/display-contents.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

36 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>display: contents</title>
<link rel="help" href="https://w3c.github.io/mathml-core/#css-styling">
<meta name="assert" content="Verify that display: contents computes to display: none">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/mathml-fragments.js"></script>
<script>
setup({ explicit_done: true });
window.addEventListener("load", runTests);
function runTests() {
var container = document.getElementById("container");
for (tag in MathMLFragments) {
container.insertAdjacentHTML("beforeend", `<math>${MathMLFragments[tag]}</math>`);
}
test(function() {
Array.from(document.getElementsByClassName("element")).forEach(element => {
var style = window.getComputedStyle(element);
element.setAttribute("style", "display: contents");
assert_equals(style.getPropertyValue("display"), "none", `${tag}`);
});
}, "display: contents computes to display: none");
done();
}
</script>
</head>
<body>
<div id="log"></div>
<div id="container">
<math class="element"></math>
</div>
</body>
</html>