summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/onload-remove-renderview.html
blob: 6052e4e6a7772451f2f3919fdaaee606b8f357c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>

<p>Passes if it does not crash in ASAN.</p>

<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

var iframe = document.createElement('iframe');
iframe.onload = function() {
    var input = document.createElement('input');
    input.autofocus = true;
    iframe.contentDocument.body.offsetTop;
    iframe.contentDocument.body.appendChild(input);
    input.onfocus = function() {
        iframe.contentDocument.body.style.height = '100px';
        iframe.remove();
        if (window.testRunner)
            testRunner.notifyDone();
    };
}

document.documentElement.offsetTop;
document.documentElement.appendChild(iframe);
</script>