blob: 2d7e773478f982ca04b55f5d6027dec9017f4bcb [file] [log] [blame]
<!doctype HTML>
<!--
Calls commit without first acquiring, which fails.
-->
<style>
#container {
contain: style layout;
width: 150px;
height: 150px;
background: lightblue;
}
#child {
width: 50px;
height: 50px;
background: lightgreen;
}
</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().commit().then(
() => { finishTest("FAIL"); },
() => { finishTest("PASS"); });
document.body.appendChild(container);
}
window.onload = runTest;
</script>