2 <title>Test for closing window in pagehide event callback caused by history.back()
</title>
3 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
4 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
5 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1432396">Mozilla Bug
1432396</a>
8 SimpleTest
.waitForExplicitFinish();
10 const w
= window
.open("file_close_onpagehide1.html");
11 window
.addEventListener("message", e
=> {
12 is(e
.data
, "initial", "The initial page loaded");
13 window
.addEventListener("message", e
=> {
14 is(e
.data
, "second", "The second page loaded");
15 w
.onpagehide
= () => {
17 info("try to close the popped up window in onpagehide");
22 w
.location
= "file_close_onpagehide2.html";