<!DOCTYPE HTML>
<html>
<head>
<title>Huge SVG Must Display Correctly</title>
<style type="text/css">
.nomargin {
margin: 0px auto;
}
</style>
<script>
// We manually send heartbeats while the SVG is loading since it can take a
// long time and we aren't making any function calls that could be wrapped.
function manuallySendHeartbeat() {
if (wrapper !== undefined) {
wrapper.sendHeartbeatThrottled();
}
}
function sendResult(status, detail) {
console.log(detail);
if (window.domAutomationController) {
window.domAutomationController.send(status);
} else {
console.log(status);
}
}
// We do this logic in the page to simplify the page action and make
// it clearer that it's executed.
function scrollOutAndBack() {
manuallySendHeartbeat();
requestAnimationFrame(() => {
window.scrollTo(1000, 1000);
requestAnimationFrame(() => {
window.scrollTo(0, 0);
requestAnimationFrame(() => {
sendResult("SUCCESS", "Test complete");
});
});
});
}
</script>
</head>
<body>
<img src="lots-of-lines.svg" onload="scrollOutAndBack()"></img>
</body>
</html>