scrollbar-part-created-with-no-parent-crash.html 1.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<html>
Test passes if it does not crash.
<style>
body
{
    margin: 0;
}
::-webkit-scrollbar {
    -webkit-logical-height: 65536;
    -webkit-border-image: url(does_not_exist) 0 2 0 2;
}

.inner:not(table) {
    padding: 400px;
}
</style>
<script>
18 19
if (window.testRunner)
    testRunner.dumpAsText();
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

function showScroller()
{
    var scroller = document.createElement('div');
    scroller.className = 'scroller';

    var contents = document.createElement('div')
    contents.className = 'inner';
    scroller.appendChild(contents);

    document.getElementById('container').appendChild(scroller);
}
  
function hideScroller()
{
    var scroller = document.getElementById('container').querySelectorAll('.scroller')[0];
    scroller.parentNode.removeChild(scroller);
}
  
function doTest()
{
    if (window.eventSender) {
        eventSender.mouseMoveTo(50, 40);
        eventSender.mouseMoveTo(50, 55);
        eventSender.mouseMoveTo(50, 0);
    }
}

window.addEventListener('load', doTest, false);
</script>
<div id="container" onmouseover="showScroller()" onmouseout="hideScroller()">
<p>PASS</p>
</div>
</html>