hidden-iframe-scrollbar-crash.html 848 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<style>
::-webkit-scrollbar {
  width: 16px;
}
</style>

<body>
<iframe id="iframe" width="1"></iframe>
<p>This tests to make sure that an iframe with custom scrollbars that is
hidden does not crash the browser when unloaded.  The test passes if it does
not crash.</p>
</body>

<script>
function runTest()
{
    if (document.location.search == "?done") {
        document.body.appendChild(document.createTextNode("PASSED"));
19 20
        if (window.testRunner)
            testRunner.notifyDone();
21 22 23
        return;
    }

24 25 26
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
27 28 29 30 31 32 33 34 35 36 37 38
    }

    setTimeout(function() {
      document.getElementById("iframe").style.display = "none";

      // Unload the page to see if the crash is triggered.
      document.location.href = "?done";
    }, 0);
}

runTest();
</script>