nestedDocument.open('text/html', 'replace');
nestedDocument.write('<!DOCTYPE html>\n<script>\ndocument.onscroll=function(){};\n' +
'window.onscroll=function(){};</' + 'script>\n');
+ nestedDocument.close();
shouldBe('window.internals.scrollEventHandlerCount(document)', '3');
var nestedDocument = iframe.contentWindow.document;
nestedDocument.open('text/html', 'replace');
nestedDocument.write('<!DOCTYPE html><div id=foo></div>');
+ nestedDocument.close();
var element = frames[0].document.getElementById('foo');
var listener = function() { }