blob: 6a7640d3cd5c35480ed0e1fd5302825ebf200214 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
.red {
background-color: red;
}
.green {
background-color: green;
}
div {
height: 100px;
width: 100px;
}
.composited {
-webkit-transform: translateZ(0);
}
</style>
</head>
<body>
<!-- In the pixel results, one green squares should be visible. -->
<div class="red">
<div id="target" class="red composited">
</div>
</div>
<p>
<script>
if (window.testRunner) {
testRunner.dumpAsText(true); // This is only useful as a pixel test.
testRunner.display();
testRunner.loseCompositorContext(100); // Make it lose the context over and over again.
// Force display many times so that the compositor gives up on GPU acceleration
// The number of times to try should be at least as many as the
// m_numFailedRecreateAttempts in CCSingleThreadProxy.
for (var i = 0; i < 10; ++i)
testRunner.display();
}
var target = document.getElementById("target");
target.classList.remove("red");
target.classList.add("green");
</script>
</body>
</html>