Closed Bug 1769020 Opened 2 years ago Closed 2 years ago

fix up and re-enable browser/base/content/test/general/browser_gestureSupport.js

Categories

(Core :: Panning and Zooming, defect)

defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

No description provided.

The bulk of the changes are to make the sending of events much more similar to how widget/tests/browser/browser_test_swipe_gesture.js works (because that is a test that is currently working well).

browser_test_swipe_gesture.js opens a tab and uses tab.linkedBrowser to target the events. This makes sense because when we add the event listeners here https://searchfox.org/mozilla-central/rev/b72e9d7d63bf499d1d8168291b93d4ec7fde236e/browser/base/content/browser-gestureSupport.js#49 we add them to the tabbox.

We create synthesizeSimpleGestureEvent in apz_test_native_event_utils.js so we can target other elements (rather than widget relative coords) more easily. This makes several functions async so we propagate that through.

We also change the coords from 0,0 to 10,10 to make sure it's within the bounds of the tabbox event listener (not sure if this is necessary or not, I didn't test without this).

And then I ran eslint on the file. That's should cover everything, hopefully that explanation makes review relatively easy.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

This was failing on Linux only. I thought maybe we were hitting the title bar and so weren't seeing the events so tried moving the events further into the window and it started working.

Depends on D146160

Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa4cb1fe1502
Fix up and re-enable browser/base/content/test/general/browser_gestureSupport.js. r=hiro
https://hg.mozilla.org/integration/autoland/rev/0cb803c9f1bd
Send a couple of test events a little further into the window. r=hiro
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: