blob: 3f04f77092d375be7dcbe5f208b221de3c324cd0 [file] [log] [blame]
<!doctype HTML>
<!--
Runs an updateAndCommit() without acquiring, which fails.
-->
<style>
#container {
contain: style layout;
width: 150px;
height: 150px;
background: lightblue;
}
</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.displayLock.updateAndCommit().then(
() => { finishTest("PASS"); },
(e) => { finishTest("FAIL " + e.message); });
}
window.onload = runTest;
</script>