4 https://bugzilla.mozilla.org/show_bug.cgi?id=1288228
8 <title>Test for Bug
1288228</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
12 /** Test for Bug
1288228 **/
13 /* Note: the crash in bug
1288228 doesn't happen reliably (and only happens
14 * after several reloads). So, we reload the iframe
10 times, and then call
15 * it good if we haven't crashed.
17 const maxReloads =
10;
18 let remainingReloads = maxReloads;
20 /* The helper-file in the iframe will notify us after it's performed its
21 * potentially-crash-triggering tweak. At that point, we reload the iframe
22 * and wait for it to notify again (or we simply finish, if we've completed
23 * all of the reloads we planned to do).
25 window.addEventListener(
"message", reloadIframe);
27 function reloadIframe() {
28 if (--remainingReloads ==
0) {
29 ok(true,
"Didn't crash!");
32 var frame = document.getElementById(
"testIframe");
33 frame.setAttribute(
"src",
"");
34 frame.setAttribute(
"src",
"tearoff_with_cc_helper.html");
37 SimpleTest.waitForExplicitFinish();
40 <body onload=
"reloadIframe()">
41 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1288228">
45 <iframe id=
"testIframe"></iframe>