|
1 const Cc = Components.classes; |
|
2 const Ci = Components.interfaces; |
|
3 |
|
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); |
|
14 |
|
15 run_test_in_child("../unit/test_pb_notification.js", |
|
16 function() { |
|
17 do_check_eq(notifications, 1); |
|
18 do_test_finished(); |
|
19 }); |
|
20 } |