blob: 41436e971831ec0d2101dad54b58df34321e7749 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<meta name="fuzzy" content="maxDifference=0-2; totalPixels=0-10000" />
<style>
#box {
width: 100px;
height: 100px;
background-color: blue;
color: black;
}
</style>
<script type="text/javascript" src="../../resources/snapshot-helper.js"></script>
</head>
<body>
<div id="box" style="opacity: 0.95;">
<div style="opacity: 0.95;">
Is this included?
</div>
</div>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
}
async function main() {
if (!window.internals) {
console.log('FAIL: window.internals is not available');
return;
}
const box = document.getElementById('box');
const canvas = await SnapshotHelper.takeSnapshot(box);
box.remove();
document.body.appendChild(canvas);
if (window.testRunner) {
testRunner.notifyDone();
}
}
window.addEventListener('load', main, false);
</script>
</body>
</html>