Flutter Engine
The Flutter Engine
DrawSolidBlueScreenTest.java
Go to the documentation of this file.
1package dev.flutter.scenariosui;
2
3import android.content.Intent;
4import androidx.annotation.NonNull;
5import androidx.test.ext.junit.runners.AndroidJUnit4;
6import androidx.test.filters.LargeTest;
7import androidx.test.rule.ActivityTestRule;
8import dev.flutter.scenarios.PlatformViewsActivity;
9import org.junit.Rule;
10import org.junit.Test;
11import org.junit.runner.RunWith;
12
13@RunWith(AndroidJUnit4.class)
14@LargeTest
15public final class DrawSolidBlueScreenTest {
16 @Rule @NonNull
17 public ActivityTestRule<PlatformViewsActivity> activityRule =
18 new ActivityTestRule<>(
19 PlatformViewsActivity.class, /*initialTouchMode=*/ false, /*launchActivity=*/ false);
20
21 @Test
22 public void test() throws Exception {
23 Intent intent = new Intent(Intent.ACTION_MAIN);
24 intent.putExtra("scenario_name", "solid_blue");
25 ScreenshotUtil.capture(activityRule.launchActivity(intent), "DrawSolidBlueScreenTest");
26 }
27}
ActivityTestRule< PlatformViewsActivity > activityRule
static void capture(@NonNull TestableFlutterActivity activity, @NonNull String captureName)