| Index: LayoutTests/fast/events/scroll-event-handler-count.html
|
| diff --git a/LayoutTests/fast/events/scroll-event-handler-count.html b/LayoutTests/fast/events/scroll-event-handler-count.html
|
| index 7c757ab313869cccb09b79f1656ad16e01499805..795c84144347306446d0828f385164e6c9d3c70a 100644
|
| --- a/LayoutTests/fast/events/scroll-event-handler-count.html
|
| +++ b/LayoutTests/fast/events/scroll-event-handler-count.html
|
| @@ -33,5 +33,30 @@ description("This test checks that we correctly update the scroll event handler
|
| document.onscroll = null;
|
| shouldBe('window.internals.scrollEventHandlerCount(document)', '0');
|
| })();
|
| +debug("Test that nested Documents' scroll handlers are properly tracked in their parent Document.");
|
| +(function() {
|
| + var iframe = document.createElement('iframe');
|
| + var scrolltarget = document.getElementById('scrolltarget');
|
| + scrolltarget.onscroll = function() {};
|
| +
|
| + shouldBe('window.internals.scrollEventHandlerCount(document)', '1');
|
| +
|
| + scrolltarget.appendChild(iframe);
|
| +
|
| + nestedDocument = iframe.contentWindow.document;
|
| + nestedDocument.open('text/html', 'replace');
|
| + nestedDocument.write('<!DOCTYPE html>\n<script>\ndocument.onscroll=function(){};\n</' + 'script>\n');
|
| + shouldBe('window.internals.scrollEventHandlerCount(nestedDocument)', '1');
|
| + shouldBe('window.internals.scrollEventHandlerCount(document)', '2');
|
| +
|
| + nestedDocument.write('<script>document.onscroll=undefined</' + 'script>\n');
|
| + shouldBe('window.internals.scrollEventHandlerCount(nestedDocument)', '0');
|
| + shouldBe('window.internals.scrollEventHandlerCount(document)', '1');
|
| +
|
| + nestedDocument.close();
|
| +
|
| + scrolltarget.removeChild(iframe);
|
| + shouldBe('window.internals.scrollEventHandlerCount(document)', '1');
|
| +})();
|
| </script>
|
| </body>
|
|
|