B2G/gecko/browser/components/sessionstore/test/browser_659591.js
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */
Any copyright is dedicated to the Public Domain.
Any copyright is dedicated to the Public Domain .
function test() {
  waitForExplicitFinish();
  let eventReceived = false;
  registerCleanupFunction(function () {
    ok(eventReceived, "SSWindowClosing event received");
  });
  newWindow(function (win) {
    win.addEventListener("SSWindowClosing", function onWindowClosing() {
      win.removeEventListener("SSWindowClosing", onWindowClosing, false);
      eventReceived = true;
      waitForFocus(finish);
    }, false);
    win.close();
  });
}
function test ( ) { waitForExplicitFinish ( ) ; let eventReceived = false ; registerCleanupFunction ( function ( ) { ok ( eventReceived , "SSWindowClosing event received" ) ; } ) ; newWindow ( function ( win ) { win . addEventListener ( "SSWindowClosing" , function onWindowClosing ( ) { win . removeEventListener ( "SSWindowClosing" , onWindowClosing , false ) ; eventReceived = true ; waitForFocus ( finish ) ; } , false ) ; win . close ( ) ; } ) ; }
Any copyright is dedicated to the Public Domain.
Any copyright is dedicated to the Public Domain .