Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 if (typeof Cc === "undefined")
2 Cc = Components.classes;
3 if (typeof Ci === "undefined")
4 Ci = Components.interfaces;
6 function destroy_transient_docshell() {
7 var docshell = Cc["@mozilla.org/docshell;1"].createInstance(Ci.nsIDocShell);
8 docshell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = true;
9 do_test_pending();
10 do_timeout(0, Components.utils.forceGC);
11 }
13 function run_test() {
14 var obs = {
15 observe: function(aSubject, aTopic, aData) {
16 do_check_eq(aTopic, "last-pb-context-exited");
17 do_test_finished();
18 }
19 };
20 var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
21 os.addObserver(obs, "last-pb-context-exited", false);
22 destroy_transient_docshell();
23 }