Bug 725942. (Av1) browser-test.js: Ignore empty console messages. r=dtownsend.
authorSerge Gautherie <sgautherie.bz@free.fr>
Tue, 14 Feb 2012 21:37:45 +0100
changeset 86781 ad0038e0af1f4a6beae965b7dab2e048578b2130
parent 86780 b3a7561624f974ee2d663cf247322dfba3df359c
child 86782 d45c7d7b0079239c093dcb2ef3c0dda82ec793b4
child 87303 69d3a25f08217a39a6db8c6f8eaf2655c7eee0d3
child 105829 132462b85b08292526d3c3d87ecffe552ac81727
push id22055
push usersgautherie.bz@free.fr
push dateTue, 14 Feb 2012 20:38:46 +0000
treeherdermozilla-central@ad0038e0af1f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdtownsend
bugs725942
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 725942. (Av1) browser-test.js: Ignore empty console messages. r=dtownsend.
testing/mochitest/browser-test.js
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -210,16 +210,20 @@ Tester.prototype = {
       // Tests complete, notify the callback and return
       this.callback(this.tests);
       this.callback = null;
       this.tests = null;
     }
   },
 
   observe: function Tester_observe(aConsoleMessage) {
+    // Ignore empty messages.
+    if (!aConsoleMessage.message)
+      return;
+
     try {
       var msg = "Console message: " + aConsoleMessage.message;
       if (this.currentTest)
         this.currentTest.addResult(new testMessage(msg));
       else
         this.dumper.dump("TEST-INFO | (browser-test.js) | " + msg.replace(/\n$/, "") + "\n");
     } catch (ex) {
       // Swallow exception so we don't lead to another error being reported,