This required a few changes to ContentAnalysis.sys.mjs to: - allow using an overridden nsIContentAnalysis and calling initialize() again so it will reevaluate whether content analysis is active and set up the needed observers to show dialogs. - clean up some logic about setting up and tearing down observers This should let us test more dialogs in the future - I'm starting with the quit confirm dialog because it's been a problem before. Differential Revision: https://phabricator.services.mozilla.com/D245572