blob: 3ce0608036eeaaf53ec24d5d5901434febf4f4f6 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<style>
div {
overflow: scroll;
height: 260px;
width: 420px;
}
iframe {
height: 250px;
width: 400px;
margin-top: 400px;
}
</style>
<div id="div">
<iframe id="iframe" src="resources/scroll-into-view-twice-iframe.html"></iframe>
</div>
<script>
promise_test(t => {
var iframe = document.getElementById("iframe");
var div = document.getElementById("div");
return new Promise(function (resolve) {
iframe.addEventListener("load", function() {
resolve();
});
}).then(() => {
assert_greater_than(div.scrollTop, 380);
});
});
</script>