Bug 1170449 - Nullify the onpointer* event handlers before calling SimpleTest.finish() in test_bug967796.html. r=smaug, a=test-only
authorJulien Wajsberg <felash@gmail.com>
Thu, 09 Jul 2015 00:39:00 -0400
changeset 268758 6fb042f0271d014e589ffebc66a158baff3ce24c
parent 268757 113007b56abf92a7ce6a2950e205530df73b029b
child 268759 fdfc95cad1215ff59653a5f85f37c3b9bab9e330
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, test-only
bugs1170449, 967796
milestone41.0a2
Bug 1170449 - Nullify the onpointer* event handlers before calling SimpleTest.finish() in test_bug967796.html. r=smaug, a=test-only
dom/events/test/test_bug967796.html
--- a/dom/events/test/test_bug967796.html
+++ b/dom/events/test/test_bug967796.html
@@ -148,16 +148,24 @@ function runTests() {
   expectedRelatedEnter = outside;
   expectedRelatedLeave = iframe;
   synthesizePointer(iframe.contentDocument.body, r.width / 2, r.height / 4, {type: "pointerdown"},
                     iframe.contentWindow);
   synthesizePointer(iframe.contentDocument.body, r.width / 2 + 1, r.height / 4 + 1, {type: "pointermove"},
                     iframe.contentWindow);
   is(pointerentercount, 11, "Unexpected pointerenter event count!");
 
+  Array.from(document.querySelectorAll('*'))
+    .concat([iframe.contentDocument.body.firstChild, iframe.contentDocument.body.lastChild])
+    .forEach((elt) => {
+      elt.onpointerenter = null;
+      elt.onpointerleave = null;
+      elt.onpointerenter = null;
+      elt.onpointerleave = null;
+    });
   SpecialPowers.clearUserPref("dom.w3c_pointer_events.enabled");      // Disable Pointer Events
 
   SimpleTest.finish();
 }
 
 function penter(evt) {
   ++pointerentercount;
   evt.stopPropagation();