blob: 9f0e4ed6e86b4270dce4db9e84d978903f88f9df [file] [log] [blame]
<!doctype HTML>
<!--
Runs an acquire(), then updates without connecting the element.
-->
<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(() => {
container.getDisplayLock().update().then(
() => { finishTest("FAIL"); },
() => { finishTest("PASS"); });
});
}
window.onload = runTest;
</script>