blob: 4981e6dbb3c9c54e671d5a2a6fb5d2fe7b11e08b [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ ModelElementEnabled=true ] -->
<html>
<head>
<style>
model {
opacity: 0.5;
}
</style>
</head>
<body>
<model id="model">
<source src="resources/heart.usdz">
</model>
<pre id="layers"></pre>
<script>
let layers = document.getElementById("layers");
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
} else
layers.textContent = "This test requires testRunner.";
let model = document.getElementById("model");
model.ready.then(value => {
if (window.testRunner)
layers.innerText = window.internals.platformLayerTreeAsText(model);
model.remove();
}, reason => {
layers.textContent = `Failed. Model did not load: ${reason}`;
}).finally(() => {
if (window.testRunner)
testRunner.notifyDone();
});
</script>
</body>
</html>