fune/docshell/test/unit/test_pb_notification.js
Toby Ward 415ae552bb Bug 1496082: Enable ESLint for docshell/test/navigation and docshell/test/unit (automatic fixes only). r=bzbarsky
Enabled ESLint for:

* docshell/test/navigation/**
* docshell/test/unit/**
* docshell/test/unit_ipc/**

Changed .eslintignore to allow for this and ran ./mach eslint --fix on the above directories and checked automatic fixes

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

--HG--
extra : moz-landing-system : lando
2018-11-06 14:48:43 +00:00

19 lines
606 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();
},
};
var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
os.addObserver(obs, "last-pb-context-exited");
destroy_transient_docshell();
}