blob: 78068c195fef63b7d3857f9dbf5d658757b350d5 [file] [log] [blame]
<!doctype HTML>
<!--
Runs an acquireDisplayLock, which suspends the context.
The associated promise should never resolve.
-->
<style>
#container {
contain: content;
width: 100px;
height: 100px;
}
</style>
<div id="log"></div>
<script>
// TODO(vmpstr): In WPT this needs to be replaced with reftest-wait.
if (window.testRunner)
window.testRunner.waitUntilDone();
function finishTest(status_string) {
if (document.getElementById("log").innerHTML === "")
document.getElementById("log").innerHTML = status_string;
if (window.testRunner)
window.testRunner.notifyDone();
}
function runTest() {
let container = document.createElement("div");
container.id = "container";
container.getDisplayLock().acquire({ timeout: Infinity }).then(() => {
document.body.appendChild(container);
setTimeout(() => { finishTest("PASS"); }, 100);
});
}
window.onload = runTest;
</script>