Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / layers / removed-by-scroll-handler.html
blob593617d9a0c09fd35e315b7d67f8936dd2ffc8aa
1 <script>
2 if (window.testRunner) {
3 testRunner.waitUntilDone();
4 testRunner.dumpAsText();
6 </script>
7 <p>
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>.
10 </p>
11 <p>
12 Result: <span id="result">test did not complete.</span>
13 </p>
14 <div id="t" style="overflow: auto; width: 200px; height: 100px;" onscroll="this.parentNode.removeChild(this);handleScroll(0);">
15 <div style="height: 200px;"></div>
16 </div>
18 <div style="overflow: auto; width: 200px; height: 100px;" onscroll="this.parentNode.removeChild(this);handleScroll(1);">
19 <div style="height: 200px;"></div>
20 <div id="d"></div>
21 </div>
23 <script>
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();
43 </script>