Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9a936c0 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Fix assertion failure in TaskPositionerTest

The assertion error is caused because the test tries to shrink window
width more than mMinVisibleWidth.

The CL reduces the amount of mouse move so that it does not shrink the
window beyond mMinVisibleWidth.

Bug: 70123691
Test: atest TaskPositionerTest#testPortraitPreservedWindowResizingDragTopLeft
Change-Id: I03b8b712e365bf07a6b9112d80d4a5e0f2ea77c8
parent 67f2f4b2
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -374,7 +374,6 @@ public class TaskPositionerTests extends WindowTestsBase {
     * right things upon resizing when dragged from the top left corner.
     */
    @Test
    @Ignore
    public void testPortraitPreservedWindowResizingDragTopLeft() throws Exception {
        final Rect r = new Rect(330, 100, 630, 600);
        mDimBounds.set(r);
@@ -390,8 +389,8 @@ public class TaskPositionerTests extends WindowTestsBase {
                mPositioner.getWindowDragBounds());

        // Drag to a good portrait size.
        mPositioner.resizeDrag(500.0f, 0.0f);
        assertBoundsEquals(new Rect(500 + MOUSE_DELTA_X, MOUSE_DELTA_Y, r.right, r.bottom),
        mPositioner.resizeDrag(400.0f, 0.0f);
        assertBoundsEquals(new Rect(400 + MOUSE_DELTA_X, MOUSE_DELTA_Y, r.right, r.bottom),
                mPositioner.getWindowDragBounds());

        // Drag to a too small size for the height and the the width shrinking.