forked from mirrors/gecko-dev
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
19 lines
606 B
JavaScript
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();
|
|
}
|