Bug 1058072 - Result logged after SimpleTest.finish() with test_bug432698.html. r=smaug, a=test-only
authorMartijn Wargers <mwargers@mozilla.com>
Mon, 25 Aug 2014 17:48:18 +0200
changeset 217650 aedf42b6ead30cbe957009d35afaf94e53b97015
parent 217649 c665d9c7682d4d1026cc0585a6edb97170b47610
child 217651 57cca58e5bf029ec6bb329cceda86761e31f162a
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, test-only
bugs1058072, 432698
milestone33.0a2
Bug 1058072 - Result logged after SimpleTest.finish() with test_bug432698.html. r=smaug, a=test-only
dom/events/test/test_bug432698.html
--- a/dom/events/test/test_bug432698.html
+++ b/dom/events/test/test_bug432698.html
@@ -127,16 +127,35 @@ function runTests() {
                   iframe.contentWindow);
   is(mouseentercount, 7, "Unexpected mouseenter event count!");
   expectedRelatedEnter = iframe;
   expectedRelatedLeave = outside;
   sendMouseEvent("mousemove", outside);
   is(mouseleavecount, 7, "Unexpected mouseleave event count!");
 
   checkRelatedTarget = false;
+
+  iframe.contentDocument.body.firstChild.onmouseenter = null;
+  iframe.contentDocument.body.firstChild.onmouseleave = null;
+  iframe.contentDocument.body.lastChild.onmouseenter = null;
+  iframe.contentDocument.body.lastChild.onmouseleave = null;
+
+  container.onmouseenter = null;
+  container.onmouseleave = null;
+  container.onmouseout = null;
+  container.onmouseover = null;
+
+  var children = container.getElementsByTagName('*');
+  for (var i=0;i<children.length;i++) {
+    children[i].onmouseenter = null;
+    children[i].onmouseleave = null;
+    children[i].onmouseout = null;
+    children[i].onmouseover = null;
+  }
+
   SimpleTest.finish();
 }
 
 function menter(evt) {
   ++mouseentercount;
   evt.stopPropagation();
   if (expectedMouseEnterTargets.length) {
     var t = expectedMouseEnterTargets.shift();