docshell/test/unit_ipc/test_pb_notification_ipc.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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