1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug419132.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=419132 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 419132</title> 1.11 + <script type="application/javascript" src="/MochiKit/MochiKit.js"></script> 1.12 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.14 +</head> 1.15 +<body> 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=419132">Mozilla Bug 419132</a> 1.17 +<p id="display"></p> 1.18 +<div id="content" style="display: none"> 1.19 + 1.20 +</div> 1.21 +<iframe id="i"></iframe> 1.22 +<pre id="test"> 1.23 +<script type="application/javascript"> 1.24 + 1.25 +/** Test for Bug 419132 **/ 1.26 + 1.27 +SimpleTest.waitForExplicitFinish(); 1.28 +addLoadEvent(function() { 1.29 + var iframe = document.getElementById("i"); 1.30 + var loadCounts = 4; 1.31 + iframe.addEventListener("load", function() { 1.32 + if (--loadCounts == 0) { 1.33 + ok(true, "This is a mochikit version of a crash test. To complete is to pass."); 1.34 + SimpleTest.finish(); 1.35 + } else { 1.36 + // Garbage collect after every other load 1.37 + if ((loadCounts % 2) == 1) { 1.38 + SpecialPowers.gc(); 1.39 + } 1.40 + setTimeout(function() { 1.41 + iframe.contentWindow.location.reload(); 1.42 + }, 0); 1.43 + } 1.44 + }, false); 1.45 + iframe.src = "bug419132.html"; 1.46 +}); 1.47 + 1.48 +</script> 1.49 +</pre> 1.50 +</body> 1.51 +</html>