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

Skip to content
Commit 2445f858 authored by Chavi Weingarten's avatar Chavi Weingarten
Browse files

Add TestAPI to replace content on a display.

The current tests use MediaProjection to test that content is updated
frame by frame. However, this causes several issues, like having to
accept the permission dialog, having to wait for app launch animations
to complete, content overlaying the test area. Instead, the tests only
need to capture the window being tested. To do this, the test app
creates a VirtualDisplay and then swaps the content of the display with
a mirror of the window being tested. This way, the frames received in
the VD only contain the content in the window mirror and nothing else on
screen.

This reduces the test time since we don't need to wait for a foreground
service and the permission dialog to be clicked, nor does it have to
wait for any animations to complete. The test can start as soon as the
window is placed on screen and the VirtualDisplay contains the mirror.

It also reduces flakes becuase there's no chance of other content
showing over the test area so the pixels in the VD are deterministic.

Test: SurfaceSyncGroupContinuousTest
Test: ASurfaceControlBackPressureTest
Test: SurfacePackageFlickerTest
Test: AttachedSurfaceControlSyncTest
Test: SurfaceViewSyncTest
Test: SurfaceViewSyncContinuousTest

Bug: 282169297
Bug: 288339794
Change-Id: I311a30f8e16b99034b9a662fe2755630d68fcb80
parent 919cffbb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment