Bug 684092 - browser_tapping.js forgets one time to removeEventListener panFinished r=mbrubeck
authorMartijn Wargers <martijn.martijn@gmail.com>
Fri, 09 Sep 2011 15:12:53 +0200
changeset 76835 c4d9981dc228a2f85d70dedfc0b3368d5b8c2caf
parent 76834 4ec6e53436e6f5e1349f3dbf8bb9faff15b2762a
child 76836 48542769e4a6d0f25940de81bd1c655e7a847027
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersmbrubeck
bugs684092
milestone9.0a1
Bug 684092 - browser_tapping.js forgets one time to removeEventListener panFinished r=mbrubeck
mobile/chrome/tests/browser_tapping.js
--- a/mobile/chrome/tests/browser_tapping.js
+++ b/mobile/chrome/tests/browser_tapping.js
@@ -227,16 +227,17 @@ gTests.push({
     EventUtils.synthesizeMouse(document.documentElement, width / 2, height / 3, { type: "mousedown" });
     EventUtils.synthesizeMouse(document.documentElement, width / 2, height * 2 / 3, { type: "mousemove" });
     setTimeout(function() {
       EventUtils.synthesizeMouse(document.documentElement, width / 2, height * 2 / 3, { type: "mouseup" });
       ok(checkEvents([]), "Fired a pan + delay which should be seen as a non-event");
       clearEvents();
 
       window.addEventListener("PanFinished", function() {
+        window.removeEventListener("PanFinished", arguments.callee, true);
         setTimeout(gCurrentTest.longTapPassTest, 0);
       }, true);
     }, 500);
   },
 
   longTapPassTest: function() {
     let browser = gCurrentTab.browser;
     let inputHandler = browser.parentNode;