Skip to content

Commit

Permalink
Test custom properties with fullscreen's ::backdrop (web-platform-tes…
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip authored Jan 10, 2024
1 parent 5f34e57 commit 6ee66f9
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fullscreen/rendering/backdrop-iframe.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>::backdrop for a fullscreen iframe element</title>
<link rel=match href="backdrop-iframe-ref.html">
<link rel=match href="backdrop-green-ref.html">
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/6939">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
Expand Down
27 changes: 27 additions & 0 deletions fullscreen/rendering/backdrop-inherit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html class=reftest-wait>
<title>::backdrop inherits style from the fullscreen element</title>
<link rel=match href="backdrop-green-ref.html">
<link rel=help href="https://github.com/whatwg/fullscreen/issues/124">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
body {
--bg: red;
}
div {
--bg: green;
}
div::backdrop {
background: var(--bg);
}
</style>
<div></div>
<script>
document.addEventListener('fullscreenchange', () => {
document.documentElement.classList.remove('reftest-wait');
});
test_driver.bless('fullscreen', () => {
document.querySelector('div').requestFullscreen();
});
</script>

0 comments on commit 6ee66f9

Please sign in to comment.