Bug 633492 - remove useless test-window-helpers.js dump statements. remove dump statements. r=sid0
authorAndrew Sutherland <asutherland@asutherland.org>
Fri, 11 Feb 2011 06:43:12 -0800
changeset 7126 625f6f4e11bd2d99bed3c96feca21c2f355f6f88
parent 7125 be97fd7c7eeef58a6cc5b0a54caf16413e47fddb
child 7127 2ffca7ed69136bbe1f7a3382247ab829c0170c01
push idunknown
push userunknown
push dateunknown
reviewerssid0
bugs633492
Bug 633492 - remove useless test-window-helpers.js dump statements. remove dump statements. r=sid0
mail/test/mozmill/shared-modules/test-window-helpers.js
--- a/mail/test/mozmill/shared-modules/test-window-helpers.js
+++ b/mail/test/mozmill/shared-modules/test-window-helpers.js
@@ -230,62 +230,48 @@ var WindowWatcher = {
     this._timer.initWithCallback(this, WINDOW_OPEN_CHECK_INTERVAL_MS,
                                  Ci.nsITimer.TYPE_REPEATING_SLACK);
   },
 
   /**
    * This is the nsITimer notification we receive...
    */
   notify: function WindowWatcher_notify() {
-dump("Timer check!\n");
     if (this.monitorizeOpen()) {
       // okay, the window is opened, and we should be in its event loop now.
-dump("  THIS IS IT!\n");
       let xulWindow = this.waitingList[this.waitingForOpen];
-dump(" xul window: " + xulWindow + "\n");
       let domWindow = xulWindow.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                                         .getInterface(Ci.nsIDOMWindowInternal);
-dump(" dom window: " + domWindow + "\n");
       let troller = new controller.MozMillController(domWindow);
       augment_controller(troller, this.waitingForOpen);
 
-dump(" cleanup!\n");
       delete this.waitingList[this.waitingForOpen];
       this._timer.cancel();
-dump("canceled!\n");
 
       // now we are waiting for it to close...
       this.waitingForClose = this.waitingForOpen;
       this.waitingForOpen = null;
 
       try {
-        dump("::: calling\n");
-        try {
-          let runner = new frame.Runner(collector);
-          runner.wrapper(this.subTestFunc, troller);
-        }
-        catch (ex) {
-          dump("problem running: " + ex.fileName + ":" + ex.lineNumber + ": " + ex + "\n");
-        }
-        dump("::: called\n");
+        let runner = new frame.Runner(collector);
+        runner.wrapper(this.subTestFunc, troller);
       }
       finally {
         this.subTestFunc = null;
       }
 
       // if the test failed, make sure we force the window closed...
       // except I'm not sure how to easily figure that out...
       // so just close it no matter what.
       troller.window.close();
     }
     // notify is only used for modal dialogs, which are never the first window,
     //  so we can always just use this set of timeouts/intervals.
     this._timerRuntimeSoFar += WINDOW_OPEN_CHECK_INTERVAL_MS;
     if (this._timerRuntimeSoFar >= WINDOW_OPEN_TIMEOUT_MS) {
-      dump("!!! TIMEOUT WHILE WAITING FOR MODAL DIALOG !!!\n");
       this._timer.cancel();
       throw new Error("Timeout while waiting for modal dialog.\n");
     }
   },
 
   /**
    * Symmetry for planForModalDialog; conceptually provides the waiting.  In
    *  reality, all we do is potentially soak up the event loop a little to
@@ -390,71 +376,62 @@ dump("canceled!\n");
    * Consider if the given window is something in our |waitingList|.
    *
    * @return true if we were able to fully consider the object, false if we were
    *     not and need to be called again on the window later.  This has no
    *     relation to whether the window was one in our waitingList or not.
    *     Check the waitingList structure for that.
    */
   consider: function (aXULWindow) {
-dump("### considering: " + aXULWindow + "\n");
     let docshell = aXULWindow.docShell;
     // we need the docshell to exist...
     if (!docshell)
       return false;
-dump("### has docshell\n");
+
     // we can't know if it's the right document until it's not busy
     if (docshell.busyFlags)
       return false;
-dump("### not busy\n");
+
     // it also needs to have content loaded (it starts out not busy with no
     //  content viewer.)
     if (docshell.contentViewer == null)
       return false;
-dump("### has contentViewer\n");
+
     // now we're cooking! let's get the document...
     let outerDoc = docshell.contentViewer.DOMDocument;
     // and make sure it's not blank.  that's also an intermediate state.
     if (outerDoc.location.href == "about:blank")
       return false;
-dump("has href: " + outerDoc.location.href + "\n");
+
     // finally, we can now have a windowtype!
     let windowType = outerDoc.documentElement.getAttribute("windowtype") ||
                      outerDoc.documentElement.getAttribute("id");
-dump("has windowtype: " + windowType + "\n");
-dump("this: " + this + "\n");
-dump("waitingList: " + this.waitingList + "\n");
+
     // stash the window if we were watching for it
     if (windowType in this.waitingList) {
-      dump("It's there! setting...\n");
       this.waitingList[windowType] = aXULWindow;
     }
-    else {
-      dump("Saw Window Type '" + windowType + "' but don't care.\n");
-    }
 
     return true;
   },
 
   /**
    * Closing windows have the advantage of having to already have been loaded,
    *  so things like their windowtype are immediately available.
    */
   onCloseWindow: function WindowWatcher_onCloseWindow(aXULWindow) {
-    dump("!!! CLOSE EVENT: " + aXULWindow + "\n");
     let domWindow = aXULWindow.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                                        .getInterface(Ci.nsIDOMWindowInternal);
     let windowType =
       domWindow.document.documentElement.getAttribute("windowtype") ||
       domWindow.document.documentElement.getAttribute("id");
     // XXX because of how we dance with things, equivalence is not gonna
     //  happen for us.  This is most pragmatic.
     if (this.waitingList[windowType] !== null)
       this.waitingList[windowType] = null;
-    dump("close end proc\n");
   },
 };
 
 /**
  * Call this if the window you want to get may already be open.  What we
  *  provide above just directly grabbing the window yourself is:
  * - We wait for it to finish loading.
  * - We augment it via the augment_controller mechanism.