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

Commit edd2a684 authored by Nataniel Borges's avatar Nataniel Borges Committed by Android (Google) Code Review
Browse files

Merge "Introduce a subject to assert changes over rectangles" into sc-dev

parents e2e0b773 887a3c9d
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -73,7 +73,8 @@ fun FlickerTestParameter.dockedStackDividerIsInvisible() {
fun FlickerTestParameter.appPairsPrimaryBoundsIsVisible(rotation: Int, primaryLayerName: String) {
    assertLayersEnd {
        val dividerRegion = entry.getVisibleBounds(APP_PAIR_SPLIT_DIVIDER)
        this.coversExactly(getPrimaryRegion(dividerRegion, rotation), primaryLayerName)
        visibleRegion(primaryLayerName)
            .coversExactly(getPrimaryRegion(dividerRegion, rotation))
    }
}

@@ -83,7 +84,8 @@ fun FlickerTestParameter.dockedStackPrimaryBoundsIsVisible(
) {
    assertLayersEnd {
        val dividerRegion = entry.getVisibleBounds(DOCKED_STACK_DIVIDER)
        this.coversExactly(getPrimaryRegion(dividerRegion, rotation), primaryLayerName)
        visibleRegion(primaryLayerName)
            .coversExactly(getPrimaryRegion(dividerRegion, rotation))
    }
}

@@ -93,7 +95,8 @@ fun FlickerTestParameter.appPairsSecondaryBoundsIsVisible(
) {
    assertLayersEnd {
        val dividerRegion = entry.getVisibleBounds(APP_PAIR_SPLIT_DIVIDER)
        this.coversExactly(getSecondaryRegion(dividerRegion, rotation), secondaryLayerName)
        visibleRegion(secondaryLayerName)
            .coversExactly(getSecondaryRegion(dividerRegion, rotation))
    }
}

@@ -103,7 +106,8 @@ fun FlickerTestParameter.dockedStackSecondaryBoundsIsVisible(
) {
    assertLayersEnd {
        val dividerRegion = entry.getVisibleBounds(DOCKED_STACK_DIVIDER)
        this.coversExactly(getSecondaryRegion(dividerRegion, rotation), secondaryLayerName)
        visibleRegion(secondaryLayerName)
            .coversExactly(getSecondaryRegion(dividerRegion, rotation))
    }
}

+4 −4
Original line number Diff line number Diff line
@@ -82,10 +82,10 @@ class AppPairsTestPairPrimaryAndSecondaryApps(
    fun appsEndingBounds() {
        testSpec.assertLayersEnd {
            val dividerRegion = entry.getVisibleBounds(APP_PAIR_SPLIT_DIVIDER)
            this.coversExactly(appPairsHelper.getPrimaryBounds(dividerRegion),
                primaryApp.defaultWindowName)
                .coversExactly(appPairsHelper.getSecondaryBounds(dividerRegion),
                    secondaryApp.defaultWindowName)
            visibleRegion(primaryApp.defaultWindowName)
                .coversExactly(appPairsHelper.getPrimaryBounds(dividerRegion))
            visibleRegion(secondaryApp.defaultWindowName)
                .coversExactly(appPairsHelper.getSecondaryBounds(dividerRegion))
        }
    }

+4 −4
Original line number Diff line number Diff line
@@ -87,10 +87,10 @@ class AppPairsTestUnpairPrimaryAndSecondaryApps(
    fun appsStartingBounds() {
        testSpec.assertLayersStart {
            val dividerRegion = entry.getVisibleBounds(APP_PAIR_SPLIT_DIVIDER)
            coversExactly(appPairsHelper.getPrimaryBounds(dividerRegion),
                primaryApp.defaultWindowName)
            coversExactly(appPairsHelper.getSecondaryBounds(dividerRegion),
                secondaryApp.defaultWindowName)
            visibleRegion(primaryApp.defaultWindowName)
                .coversExactly(appPairsHelper.getPrimaryBounds(dividerRegion))
            visibleRegion(secondaryApp.defaultWindowName)
                .coversExactly(appPairsHelper.getSecondaryBounds(dividerRegion))
        }
    }

+4 −4
Original line number Diff line number Diff line
@@ -183,8 +183,8 @@ class ResizeLegacySplitScreen(
                dividerBounds.bottom - WindowUtils.dockedStackDividerInset,
                displayBounds.right,
                displayBounds.bottom - WindowUtils.navigationBarHeight)
            this.coversExactly(topAppBounds, "SimpleActivity")
                .coversExactly(bottomAppBounds, "ImeActivity")
            visibleRegion("SimpleActivity").coversExactly(topAppBounds)
            visibleRegion("ImeActivity").coversExactly(bottomAppBounds)
        }
    }

@@ -203,8 +203,8 @@ class ResizeLegacySplitScreen(
                displayBounds.right,
                displayBounds.bottom - WindowUtils.navigationBarHeight)

            this.coversExactly(topAppBounds, sSimpleActivity)
                .coversExactly(bottomAppBounds, sImeActivity)
            visibleRegion(sSimpleActivity).coversExactly(topAppBounds)
            visibleRegion(sImeActivity).coversExactly(bottomAppBounds)
        }
    }

+3 −3
Original line number Diff line number Diff line
@@ -90,8 +90,8 @@ class EnterExitPipTest(
    @Test
    fun testAppCoversFullScreenWithPipOnDisplay() {
        testSpec.assertLayersStart {
            coversExactly(displayBounds, testApp.defaultWindowName)
            coversAtMost(displayBounds, pipApp.defaultWindowName)
            visibleRegion(testApp.defaultWindowName).coversExactly(displayBounds)
            visibleRegion(pipApp.defaultWindowName).coversAtMost(displayBounds)
        }
    }

@@ -99,7 +99,7 @@ class EnterExitPipTest(
    @Test
    fun pipAppCoversFullScreen() {
        testSpec.assertLayersEnd {
            coversExactly(displayBounds, pipApp.defaultWindowName)
            visibleRegion(pipApp.defaultWindowName).coversExactly(displayBounds)
        }
    }

Loading