2 if (window.testRunner) {
3 testRunner.waitUntilDone();
4 testRunner.dumpAsText();
8 Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=8360">http://bugs.webkit.org/show_bug.cgi?id=8360</a>
9 Repro crash when onscroll handler deletes the scrolled object</i>.
12 Result: <span id="result">test did not complete.</span>
14 <div id="t" style="overflow: auto; width: 200px; height: 100px;" onscroll="this.parentNode.removeChild(this);handleScroll(0);">
15 <div style="height: 200px;"></div>
18 <div style="overflow: auto; width: 200px; height: 100px;" onscroll="this.parentNode.removeChild(this);handleScroll(1);">
19 <div style="height: 200px;"></div>
24 var scrolledFirstContainer = false;
25 var scrolledSecondContainer = false;
27 document.body.offsetTop; t.scrollTop = 20;
29 document.getElementById('d').scrollIntoView();
31 function handleScroll(index)
33 if (index == 0) scrolledFirstContainer = true;
34 else if (index == 1) scrolledSecondContainer = true;
36 if (scrolledFirstContainer && scrolledSecondContainer) {
37 document.getElementById('result').innerText = "SUCCESS";
39 if (window.testRunner)
40 testRunner.notifyDone();