Add the scenario_app 'solid_blue' golden to the Android test suite (flutter/engine#50801)

This test is already running in the iOS scenario app:

![DrawSolidBlueScreenTest](https://github.com/flutter/engine/assets/168174/1b499348-f854-4e2d-aa41-f8c6b9ec616d)

It should help debug https://github.com/flutter/flutter/issues/143602 by showing if the Android UI is bleeding.
This commit is contained in:
Matan Lurey
2024-02-21 11:21:53 -08:00
committed by GitHub
parent 05fedd7c11
commit 9cb7bf430b
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package dev.flutter.scenariosui;
import android.content.Intent;
import androidx.annotation.NonNull;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;
import dev.flutter.scenarios.PlatformViewsActivity;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@LargeTest
public final class DrawSolidBlueScreenTest {
@Rule @NonNull
public ActivityTestRule<PlatformViewsActivity> activityRule =
new ActivityTestRule<>(
PlatformViewsActivity.class, /*initialTouchMode=*/ false, /*launchActivity=*/ false);
@Test
public void test() throws Exception {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.putExtra("scenario_name", "solid_blue");
ScreenshotUtil.capture(activityRule.launchActivity(intent), "DrawSolidBlueScreenTest");
}
}

View File

@@ -1,3 +1,4 @@
DrawSolidBlueScreenTest.png
ExternalTextureTests_testCanvasSurface.png
ExternalTextureTests_testCroppedMediaSurface_bottomLeft.png
ExternalTextureTests_testCroppedMediaSurface_topRight.png