1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docshell/test/file_anchor_scroll_after_document_open.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,15 @@ 1.4 +<!DOCTYPE html> 1.5 +<script> 1.6 + if (location.hash == "#target") { 1.7 + parent.postMessage("haveHash", "*"); 1.8 + } else { 1.9 + document.addEventListener("DOMContentLoaded", function() { 1.10 + document.open(); 1.11 + document.write("<!DOCTYPE html><html style='height: 100%'><body style='height: 100%'><div style='height: 200%'></div><div id='target'></div></body></html>"); 1.12 + document.close(); 1.13 + // Notify parent via postMessage, since otherwise exceptions will not get 1.14 + // caught by its onerror handler. 1.15 + parent.postMessage("doTest", "*"); 1.16 + }); 1.17 + } 1.18 +</script>