blob: 3b61a44c3c6585308b2dda5e5a955ba16c14161f [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useAcceleratedDrawing=true enablePageCache=true ] -->
<html>
<head>
<style>
.container {
position: relative;
height: 200px;
width: 200px;
margin: 10px;
padding: 10px;
border: 1px solid black;
will-change: transform;
}
</style>
<script>
var jsTestIsAsync = true;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doOnFirstLoad()
{
if (window.internals)
document.getElementById('layers-before-navigate').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_ACCELERATES_DRAWING);
setTimeout(function() {
window.location.href = 'resources/go-back.html';
}, 0);
}
function doAfterBack()
{
if (window.internals)
document.getElementById('layers-after-back').innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_ACCELERATES_DRAWING);
if (window.testRunner)
testRunner.notifyDone();
}
window.addEventListener("pageshow", function(event) {
if (event.persisted)
setTimeout(doAfterBack, 0);
}, false);
function doTest()
{
doOnFirstLoad();
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="container">
<p>This layer should use 'acceleratesDrawing' after going back to this page.</p>
</div>
<h2>Before:</h2>
<pre id="layers-before-navigate"></pre>
<h2>After:</h2>
<pre id="layers-after-back"></pre>
</body>
</html>