fune/docshell/test/unit/test_pb_notification.js
Victor Porof bcdc3a9567 Bug 1561435 - Format docshell/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35900

--HG--
extra : source : b08f475f1140b9e650b316ee2813c13ec9947678
2019-07-05 09:59:46 +02:00

18 lines
534 B
JavaScript

function destroy_transient_docshell() {
let windowlessBrowser = Services.appShell.createWindowlessBrowser(false);
windowlessBrowser.docShell.setOriginAttributes({ privateBrowsingId: 1 });
windowlessBrowser.close();
do_test_pending();
do_timeout(0, Cu.forceGC);
}
function run_test() {
var obs = {
observe(aSubject, aTopic, aData) {
Assert.equal(aTopic, "last-pb-context-exited");
do_test_finished();
},
};
Services.obs.addObserver(obs, "last-pb-context-exited");
destroy_transient_docshell();
}