gecko/docshell/test/unit/test_pb_notification.js
Luke Wagner 3250e70d87 Bug 751575 - fix and reenable test_pb_notification_ipc.js (r=jst)
--HG--
extra : rebase_source : e2d52414cd17c15792e9c4be9cc48bfdb3b02318
2012-05-03 16:25:20 -07:00

24 lines
736 B
JavaScript

if (typeof Cc === "undefined")
Cc = Components.classes;
if (typeof Ci === "undefined")
Ci = Components.interfaces;
function destroy_transient_docshell() {
var docshell = Cc["@mozilla.org/docshell;1"].createInstance(Ci.nsIDocShell);
docshell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = true;
do_test_pending();
Components.utils.schedulePreciseGC(function(){});
}
function run_test() {
var obs = {
observe: function(aSubject, aTopic, aData) {
do_check_eq(aTopic, "last-pb-context-exited");
do_test_finished();
}
};
var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
os.addObserver(obs, "last-pb-context-exited", false);
destroy_transient_docshell();
}