Backout 273173a592dc (bug 483992) for causing bug 739927
authorEd Morley <bmo@edmorley.co.uk>
Wed, 28 Mar 2012 22:52:17 +0100
changeset 93817 f0a104d6cc36c73cc391f979db4ec0c7754314e0
parent 93816 183eed448b9d7b09a3ecd98db69066e9863eedbf
child 93818 8365faf3a1560b9fa0d99352683f58451355064e
child 93886 16d5e6f8ed89a97fb83fb30514a8ce5e9a9b834c
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs483992, 739927
milestone14.0a1
backs out273173a592dcdac8523bfdf49054e10b29f6e635
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
Backout 273173a592dc (bug 483992) for causing bug 739927
dom/tests/mochitest/dom-level1-core/DOMTestCase.js
dom/tests/mochitest/dom-level2-core/DOMTestCase.js
dom/tests/mochitest/dom-level2-html/DOMTestCase.js
--- a/dom/tests/mochitest/dom-level1-core/DOMTestCase.js
+++ b/dom/tests/mochitest/dom-level1-core/DOMTestCase.js
@@ -639,16 +639,39 @@ function getResourceURI(name, scheme, co
     return fileBase + name + getSuffix(contentType);
 }
 
 
 function getImplementation() {
     return builder.getImplementation();
 }
 
+//sayrer override the SimpleTest logger
+SimpleTest._logResult = function(test, passString, failString) {
+  var msg = test.result ? passString : failString;
+  msg += " | " + test.name;
+  if (test.result) {
+      if (test.todo)
+          parentRunner.logger.error(msg)
+      else
+          parentRunner.logger.log(msg);
+  } else {
+      msg += " | " + test.diag;
+      if (test.todo) {
+        parentRunner.logger.log(msg)
+      } else {
+        if (todoTests[docName]) {
+          parentRunner.logger.log("expected error in todo testcase | " + test.name);
+        } else {
+          parentRunner.logger.error(msg);
+        }
+      } 
+  }
+}
+
 function testFails (test) {
   if (!test.result) {
     test.todo = true;
     return true;
   }
   return false;
 }
 
--- a/dom/tests/mochitest/dom-level2-core/DOMTestCase.js
+++ b/dom/tests/mochitest/dom-level2-core/DOMTestCase.js
@@ -643,16 +643,39 @@ function getResourceURI(name, scheme, co
     return fileBase + name + getSuffix(contentType);
 }
 
 
 function getImplementation() {
     return builder.getImplementation();
 }
 
+//sayrer override the SimpleTest logger
+SimpleTest._logResult = function(test, passString, failString) {
+  var msg = test.result ? passString : failString;
+  msg += " | " + test.name;
+  if (test.result) {
+      if (test.todo)
+          parentRunner.logger.error(msg)
+      else
+          parentRunner.logger.log(msg);
+  } else {
+      msg += " | " + test.diag;
+      if (test.todo) {
+        parentRunner.logger.log(msg)
+      } else {
+        if (todoTests[docName]) {
+          parentRunner.logger.log("expected error in todo testcase | " + test.name);
+        } else {
+          parentRunner.logger.error(msg);
+        }
+      } 
+  }
+}
+
 window.doc = window;  
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function(){ setUpPage(); });
 function testFails (test) {
   if (!test.result) {
     test.todo = true;
     return true;
   }
--- a/dom/tests/mochitest/dom-level2-html/DOMTestCase.js
+++ b/dom/tests/mochitest/dom-level2-html/DOMTestCase.js
@@ -643,16 +643,39 @@ function getResourceURI(name, scheme, co
     return fileBase + name + getSuffix(contentType);
 }
 
 
 function getImplementation() {
     return builder.getImplementation();
 }
 
+//sayrer override the SimpleTest logger
+SimpleTest._logResult = function(test, passString, failString) {
+  var msg = test.result ? passString : failString;
+  msg += " | " + test.name;
+  if (test.result) {
+      if (test.todo)
+          parentRunner.logger.error(msg)
+      else
+          parentRunner.logger.log(msg);
+  } else {
+      msg += " | " + test.diag;
+      if (test.todo) {
+        parentRunner.logger.log(msg)
+      } else {
+	// if (todoTests[docName]) {
+        //  parentRunner.logger.log("expected error in todo testcase | " + test.name);
+        //} else {
+          parentRunner.logger.error(msg);
+	  //}
+      } 
+  }
+}
+
 window.doc = window;  
 SimpleTest.waitForExplicitFinish();
 addLoadEvent(function(){ setUpPage(); });
 function testFails (test) {
   if (!test.result) {
     test.todo = true;
     return true;
   }