diff options
Diffstat (limited to 'tests/test_tools/selenium/core/scripts/selenium-logging.js')
-rw-r--r-- | tests/test_tools/selenium/core/scripts/selenium-logging.js | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/tests/test_tools/selenium/core/scripts/selenium-logging.js b/tests/test_tools/selenium/core/scripts/selenium-logging.js index 25e11463..6dac9518 100644 --- a/tests/test_tools/selenium/core/scripts/selenium-logging.js +++ b/tests/test_tools/selenium/core/scripts/selenium-logging.js @@ -52,6 +52,13 @@ Logger.prototype = { "width=600,height=1000,bottom=0,right=0,status,scrollbars,resizable" ); this.logWindow.moveTo(window.screenX + 1210, window.screenY + window.outerHeight - 1400); + if (browserVersion.appearsToBeBrokenInitialIE6) { + // I would really prefer for the message to immediately appear in the log window, the instant the user requests that the log window be + // visible. But when I initially coded it this way, thou message simply didn't appear unless I stepped through the code with a debugger. + // So obviously there is some timing issue here which I don't have the patience to figure out. + var pendingMessage = new LogMessage("warn", "You appear to be running an unpatched IE 6, which is not stable and can crash due to memory problems. We recommend you run Windows update to install a more stable version of IE."); + this.pendingMessages.push(pendingMessage); + } return this.logWindow; }, @@ -59,14 +66,15 @@ Logger.prototype = { if (! this.getLogWindow()) { this.openLogWindow(); } + setTimeout(function(){LOG.info("Log window displayed");}, 500); }, - logHook: function(message, className) { + logHook: function(className, message) { }, - log: function(message, className) { + log: function(className, message) { var logWindow = this.getLogWindow(); - this.logHook(message, className); + this.logHook(className, message); if (logWindow) { if (logWindow.append) { if (this.pendingMessages.length > 0) { @@ -84,7 +92,7 @@ Logger.prototype = { /* these logging messages are never flushed, which creates an enormous array of strings that never stops growing. Only turn this on if you need it for debugging! */ - //this.pendingMessages.push(new LogMessage(message, className)); + //this.pendingMessages.push(new LogMessage(className, message)); } }, @@ -101,31 +109,31 @@ Logger.prototype = { }, debug: function(message) { - this.log(message, "debug"); + this.log("debug", message); }, info: function(message) { - this.log(message, "info"); + this.log("info", message); }, warn: function(message) { - this.log(message, "warn"); + this.log("warn", message); }, error: function(message) { - this.log(message, "error"); + this.log("error", message); }, exception: function(exception) { - var msg = "Unexpected Exception: " + describe(exception, ', '); - this.error(msg); + this.error("Unexpected Exception: " + extractExceptionMessage(exception)); + this.error("Exception details: " + describe(exception, ', ')); } }; var LOG = new Logger(); -var LogMessage = function(msg, type) { +var LogMessage = function(type, msg) { this.type = type; this.msg = msg; } |