blob: 10a80cdb2aba242f22b8ef16f54b3ad2d52b6c19 [file] [log] [blame]
const addLayerTree = () => {
if (!window.internals)
return;
const layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CONTENT_LAYERS);
const output = document.createElement("pre");
output.textContent = layerTree;
document.body.insertBefore(output, document.body.firstChild);
};
const addLayerTreeAndFinish = () => {
addLayerTree();
testRunner.notifyDone();
};
if (window.internals) {
window.addEventListener("load", () => {
if (window.doNotAutomaticallyCallLayerTree != undefined && window.doNotAutomaticallyCallLayerTree) {
testRunner.waitUntilDone();
return;
}
addLayerTree();
}, false);
testRunner.dumpAsText();
}