blob: c6d06680a2f4bbbf6c526dfdb05991a9209e588f [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<p>Tiles when window is visible:</p>
<pre id="visibleResult"></pre>
<p>Tiles when window is not visible:</p>
<pre id="nonVisibleResult"></pre>
<div style="height: 3000px; width: 3000px"></div>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
internals.setSpeculativeTilingDelayDisabledForTesting(true);
onload = function() {
setTimeout(function() {
document.getElementById("visibleResult").innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
document.onvisibilitychange = function() {
if (!document.hidden)
return;
setTimeout(function() {
document.getElementById("nonVisibleResult").innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS | internals.LAYER_TREE_INCLUDES_TILE_CACHES);
testRunner.resetPageVisibility();
internals.setSpeculativeTilingDelayDisabledForTesting(false);
testRunner.notifyDone();
}, 0);
}
testRunner.setPageVisibility("hidden");
}, 0);
}
}
</script>
</body>
</html>