ladybird/Tests/LibWeb/Text/input/link-element-media-attribute.html
Timothy Flynn c9cbaeb59d LibWeb: Convert some sync tests to be async
The events tested here are decidedly async. We also can't really write
sync tests of the form "test(async () => {})". Nothing will await the
async callback.
2024-10-03 07:07:28 -04:00

20 lines
566 B
HTML

<style>
body {
background: green;
}
</style>
<script src="include.js"></script>
<script>
asyncTest(done => {
let link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("href", "body-background-color-red.css");
link.setAttribute("media", "print");
document.head.appendChild(link);
window.onload = function () {
println("document background: " + getComputedStyle(document.body).backgroundColor);
done();
};
});
</script>