Bug 1378209 - Add DEBUG log line for received observer notifications.
For debugging purposes it would be useful to see which observer
notifications have been received and handled by the Marionette
component.
MozReview-Commit-ID: 1EucCEjOXhu
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -154,16 +154,18 @@ MarionetteComponent.prototype = {
MarionetteComponent.prototype.handle = function(cmdLine) {
if (!this.enabled && cmdLine.handleFlag("marionette", false)) {
this.enabled = true;
this.logger.info("Enabled via --marionette");
}
};
MarionetteComponent.prototype.observe = function(subject, topic, data) {
+ this.logger.debug(`Received observer notification "${topic}"`);
+
switch (topic) {
case "command-line-startup":
Services.obs.removeObserver(this, topic);
this.handle(subject);
case "profile-after-change":
// Using sessionstore-windows-restored as the xpcom category doesn't
// seem to work, so we wait for that by adding an observer here.