blob: a3ba5779cd12b407cdc30c88791f7ce4449dbe76 [file] [log] [blame]
<!doctype HTML>
<html class="reftest-wait">
<meta charset="utf8">
<title>Display Locking: acquire removes paint</title>
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://github.com/WICG/display-locking">
<link rel="match" href="delayed-acquire-removes-painted-output-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
#container {
contain: style layout;
width: 150px;
height: 150px;
background: lightblue;
}
#checker {
width: 50px;
height: 50px;
background: green;
}
</style>
<div id="container"></div>
<div id="checker"></div>
<script>
function runTest() {
const container = document.getElementById("container");
container.displayLock.acquire({ timeout: Infinity, size: [150, 150] }).then(takeScreenshot);
}
window.onload = () => {
requestAnimationFrame(() => requestAnimationFrame(runTest));
};
</script>
</html>