Bug 1432773 - listen for unload in capture phase to reset click count; r=whimboo a=test-only
authorMaja Frydrychowicz <mjzffr@gmail.com>
Wed, 24 Jan 2018 15:03:53 -0500
changeset 454556 d791950b5abd3e4a3f767296183dde9ad315c996
parent 454555 d4c9c277daebc12801df7ee20fcf990911ddf23e
child 454557 982cc606296b0945a3848016ea4e00c8c5cd620c
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo, test-only
bugs1432773
milestone59.0
Bug 1432773 - listen for unload in capture phase to reset click count; r=whimboo a=test-only The bubbling phase is too late so resetClick didn't always get called. MozReview-Commit-ID: JIseY5o3oAX
testing/marionette/listener.js
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -48,17 +48,17 @@ Cu.import("chrome://marionette/content/s
 Cu.importGlobalProperties(["URL"]);
 
 let curContainer = {frame: content, shadowRoot: null};
 
 // Listen for click event to indicate one click has happened, so actions
 // code can send dblclick event
 addEventListener("click", event.DoubleClickTracker.setClick);
 addEventListener("dblclick", event.DoubleClickTracker.resetClick);
-addEventListener("unload", event.DoubleClickTracker.resetClick);
+addEventListener("unload", event.DoubleClickTracker.resetClick, true);
 
 const seenEls = new element.Store();
 const SUPPORTED_STRATEGIES = new Set([
   element.Strategy.ClassName,
   element.Strategy.Selector,
   element.Strategy.ID,
   element.Strategy.Name,
   element.Strategy.LinkText,