Closed
Bug 1394510
Opened 8 years ago
Closed 8 years ago
Write mochitests for pinch-zooming behaviour
Categories
(Core :: Panning and Zooming, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: kats, Assigned: kats)
Details
Attachments
(3 files)
We don't really have any mochitests that exercise the pinch-zoom code. We should write some. (This is inspired in part due to bug 1358771 comment 7).
Assignee | ||
Comment 1•8 years ago
|
||
Here is a try push with the tests passing, but the patches aren't cleaned up in this one.
Assignee | ||
Comment 2•8 years ago
|
||
Assignee | ||
Comment 3•8 years ago
|
||
Latest version: https://treeherder.mozilla.org/#/jobs?repo=try&revision=219551ef01440e0a85da1c5059af745ea92188d4
Seems like one of the tests is still failing intermittently. I'll put up the one that seems to work fine and continue poking at the other one.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8902302 [details]
Bug 1394510 - Fix GeckoLayerClient touch generation code.
https://reviewboard.mozilla.org/r/173824/#review179260
Attachment #8902302 -
Flags: review?(botond) → review+
Comment 8•8 years ago
|
||
mozreview-review |
Comment on attachment 8902303 [details]
Bug 1394510 - Extract a helper method to generate more generic touch sequences.
https://reviewboard.mozilla.org/r/173826/#review179270
::: gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js:250
(Diff revision 1)
> + // The last synthesizeNativeTouch call will be the TOUCH_REMOVE which happens
> + // one iteration of aPosition after the last non-null value.
> + var lastSynthesizeCall = lastNonNullValue + aTouchIds.length;
> +
> + // track which touches are down and which are up. start with all up
> + var touchIsDown = new Array(aTouchIds.length);
Since the array stores points, not booleans, I'd call it something like |currentPositions|.
::: gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js:308
(Diff revision 1)
> + var continuation = synthesizeNativeTouchSequences(aElement, positions, aObserver, [aTouchId]);
> + var yielded = continuation.next();
> + while (!yielded.done) {
> + yielded = continuation.next();
> }
> - synthesizeNativeTouch(aElement, aX + aDeltaX, aY + aDeltaY, SpecialPowers.DOMWindowUtils.TOUCH_CONTACT, null, aTouchId);
> + return yielded.value;
This will just always be |true|?
Attachment #8902303 -
Flags: review?(botond) → review+
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8902304 [details]
Bug 1394510 - Add a basic pinch-zoom test.
https://reviewboard.mozilla.org/r/173828/#review179290
Attachment #8902304 -
Flags: review?(botond) → review+
Assignee | ||
Comment 10•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8902303 [details]
Bug 1394510 - Extract a helper method to generate more generic touch sequences.
https://reviewboard.mozilla.org/r/173826/#review179270
> Since the array stores points, not booleans, I'd call it something like |currentPositions|.
Updated. Name was left over from a previous version when I was just using booleans :)
> This will just always be |true|?
Yeah. But we might want to add other return possibilities from synthesizeNativeTouchSequences in the future.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 14•8 years ago
|
||
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/df848e39eddd
Fix GeckoLayerClient touch generation code. r=botond
https://hg.mozilla.org/integration/autoland/rev/4f13998e509f
Extract a helper method to generate more generic touch sequences. r=botond
https://hg.mozilla.org/integration/autoland/rev/cc4bc228547e
Add a basic pinch-zoom test. r=botond
![]() |
||
Comment 15•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/df848e39eddd
https://hg.mozilla.org/mozilla-central/rev/4f13998e509f
https://hg.mozilla.org/mozilla-central/rev/cc4bc228547e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•