docshell/test/unit_ipc/test_pb_notification_ipc.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 const Cc = Components.classes;
     2 const Ci = Components.interfaces;
     4 function run_test() {
     5   var notifications = 0;
     6   var obs = {
     7     observe: function(aSubject, aTopic, aData) {
     8       do_check_eq(aTopic, "last-pb-context-exited");
     9       notifications++;
    10     }
    11   };
    12   var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
    13   os.addObserver(obs, "last-pb-context-exited", false);
    15   run_test_in_child("../unit/test_pb_notification.js",
    16                     function() {
    17                       do_check_eq(notifications, 1);
    18                       do_test_finished();
    19                     });
    20 }

mercurial