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

Commit 59f5c56f authored by chaviw's avatar chaviw
Browse files

Fixed CropLatchingTest that was failing

FinalCropLatchingRegressionForb37531386 test was failing
do to an incorrect assertion. Also added the test classes that
were not yet added to the filter so they run in presubmit.

Change-Id: Ia298ac2e9f64809373f9d0267325c6b51b70d9c5
parent 29674ddb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
        "presubmit": {
            "filter": "LayerUpdateTest.*:ChildLayerTest.*:SurfaceFlingerStress.*" 
            "filter": "LayerUpdateTest.*:ChildLayerTest.*:SurfaceFlingerStress.*:CropLatchingTest.*:GeometryLatchingTest.*"
        }
}
 No newline at end of file
+13 −2
Original line number Diff line number Diff line
@@ -566,6 +566,15 @@ protected:
        sc->expectBGColor(127, 127);
        sc->expectBGColor(128, 128);
    }

    void EXPECT_RESIZE_STATE(const char* trace) {
        SCOPED_TRACE(trace);
        ScreenCapture::captureScreen(&sc);
        // The FG is now resized too 128,128 at 64,64
        sc->expectFGColor(64, 64);
        sc->expectFGColor(191, 191);
        sc->expectBGColor(192, 192);
    }
};

TEST_F(CropLatchingTest, CropLatching) {
@@ -666,15 +675,17 @@ TEST_F(CropLatchingTest, FinalCropLatchingRegressionForb37531386) {
    mFGSurfaceControl->setFinalCrop(Rect(64, 64, 127, 127));
    SurfaceComposerClient::closeGlobalTransaction(true);

    EXPECT_INITIAL_STATE("after setting crops with geometryAppliesWithResize");

    SurfaceComposerClient::openGlobalTransaction();
    mFGSurfaceControl->setFinalCrop(Rect(0, 0, -1, -1));
    SurfaceComposerClient::closeGlobalTransaction(true);

    EXPECT_INITIAL_STATE("after setting crops with geometryAppliesWithResize");
    EXPECT_INITIAL_STATE("after setting another crop");

    completeFGResize();

    EXPECT_INITIAL_STATE("after the resize finishes");
    EXPECT_RESIZE_STATE("after the resize finishes");
}

TEST_F(LayerUpdateTest, DeferredTransactionTest) {