Bug 1685648 Comment 14 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Razvan Cojocaru from comment #13)
> EDIT: I'm guessing something along [these lines](https://searchfox.org/mozilla-central/source/gfx/layers/apz/test/gtest/TestPinching.cpp#288)?

Yep, that's a good one to take inspiration from!

Since the steps to reproduce involve the pinch having a particular shape (mostly vertical movement of the touch points), instead of calling `PinchWithTouchInput()` you probably want to just send individual touch events (as in the implementation of `PinchWithTouchInput()`) directly from the test, with the coordinates chosen to produce this shape.

`MakeApzcUnzoomable()` is what you need to simulate the "where you can't pinch zoom" part. (In terms of the code, it will ensure `mZoomConstraints.mAllowZoom == false`.)

To check whether the bug occurs, it should be sufficient to look at `apzc->GetVelocityVector()` after the fingers are lifted, and check that its magnitude is below some threshold.
(In reply to Razvan Cojocaru from comment #13)
> EDIT: I'm guessing something along [these lines](https://searchfox.org/mozilla-central/source/gfx/layers/apz/test/gtest/TestPinching.cpp#288)?

Yep, that's a good one to take inspiration from!

Since the steps to reproduce involve the pinch having a particular shape (mostly vertical movement of the touch points), instead of calling `PinchWithTouchInput()` you probably want to just send individual touch events (as in the implementation of `PinchWithTouchInput()`) directly from the test, with the coordinates chosen to produce this shape.

`MakeApzcUnzoomable()` is what you need to simulate the "page where you can't pinch zoom" part. (In terms of the code, it will ensure `mZoomConstraints.mAllowZoom == false`.)

To check whether the bug occurs, it should be sufficient to look at `apzc->GetVelocityVector()` after the fingers are lifted, and check that its magnitude is below some threshold.

Back to Bug 1685648 Comment 14