1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/src/jsurl/test/test_bug384981.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=384981 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 384981</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 + <!-- Make sure we wait for the stylesheet load --> 1.14 + <script>document.documentElement.offsetWidth</script> 1.15 +</head> 1.16 +<body> 1.17 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=384981">Mozilla Bug 384981</a> 1.18 +<p id="display"> 1.19 + <iframe src="javascript:'content'"></iframe> 1.20 +</p> 1.21 +<div id="content" style="display: none"> 1.22 + 1.23 +</div> 1.24 +<pre id="test"> 1.25 +<script class="testbody" type="text/javascript"> 1.26 + 1.27 +/** Test for Bug 384981 **/ 1.28 +SimpleTest.waitForExplicitFinish() 1.29 +addLoadEvent(function() { 1.30 + is(window.frames[0].document.documentElement.textContent, "content", 1.31 + "Onload should not fire before subframe loads"); 1.32 +}); 1.33 +addLoadEvent(SimpleTest.finish); 1.34 + 1.35 +</script> 1.36 +</pre> 1.37 +</body> 1.38 +</html> 1.39 +