From 27973fdbb6b0b2fc957636c8ec630e67c26c1e79 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Fri, 18 Nov 2011 08:12:30 +1100 Subject: [PATCH] Bug 703230 - Remove mochitest waitForFocus() debug output. r=jmaher --- .../mochitest/tests/SimpleTest/SimpleTest.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/testing/mochitest/tests/SimpleTest/SimpleTest.js b/testing/mochitest/tests/SimpleTest/SimpleTest.js index 4b958f722e1..5325ebea90a 100644 --- a/testing/mochitest/tests/SimpleTest/SimpleTest.js +++ b/testing/mochitest/tests/SimpleTest/SimpleTest.js @@ -499,21 +499,7 @@ SimpleTest.waitForFocus = function (callback, targetWindow, expectBlankPage) { return SpecialPowers.getPrivilegedProps(aWindow, 'location.href'); } - function debugFocusLog(prefix) { - info(prefix + " -- loaded: " + targetWindow.document.readyState + - " active window: " + - (SpecialPowers.activeWindow() ? "(" + SpecialPowers.activeWindow() + ") " + getHref(SpecialPowers.activeWindow()) : "") + - " focused window: " + - (SpecialPowers.focusedWindow() ? "(" + SpecialPowers.focusedWindow() + ") " + getHref(SpecialPowers.focusedWindow()) : "") + - " desired window: (" + targetWindow + ") " + getHref(targetWindow) + - " child window: (" + childTargetWindow + ") " + getHref(childTargetWindow)); - } - - debugFocusLog("before wait for focus"); - function maybeRunTests() { - debugFocusLog("maybe run tests "); if (SimpleTest.waitForFocus_loaded && SimpleTest.waitForFocus_focused && !SimpleTest.waitForFocus_started) { @@ -524,8 +510,6 @@ SimpleTest.waitForFocus = function (callback, targetWindow, expectBlankPage) { function waitForEvent(event) { try { - debugFocusLog("waitForEvent called "); - // Check to make sure that this isn't a load event for a blank or // non-blank page that wasn't desired. if (event.type == "load" && (expectBlankPage != (event.target.location == "about:blank"))) @@ -564,7 +548,6 @@ SimpleTest.waitForFocus = function (callback, targetWindow, expectBlankPage) { // If this is a child frame, ensure that the frame is focused. SimpleTest.waitForFocus_focused = (focusedChildWindow == childTargetWindow); if (SimpleTest.waitForFocus_focused) { - info("already focused"); // If the frame is already focused and loaded, call the callback directly. maybeRunTests(); }