browser/fuel/test/browser_ApplicationQuitting.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 function test() {
     2   function quitRequestObserver(aSubject, aTopic, aData) {
     3     ok(aTopic == "quit-application-requested" &&
     4        aSubject instanceof Components.interfaces.nsISupportsPRBool,
     5        "Received a quit request we're going to deny");
     6     aSubject.data = true;
     7   }
     9   // ensure that we don't accidentally quit
    10   Services.obs.addObserver(quitRequestObserver, "quit-application-requested", false);
    12   ok(!Application.quit(),    "Tried to quit - and didn't succeed");
    13   ok(!Application.restart(), "Tried to restart - and didn't succeed");
    15   // clean up
    16   Services.obs.removeObserver(quitRequestObserver, "quit-application-requested");
    17 }

mercurial