mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 22:52:52 +00:00
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.
20 lines
566 B
HTML
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>
|