1414import androidx .test .runner .AndroidJUnit4 ;
1515import dev .flutter .scenarios .ExternalTextureFlutterActivity ;
1616import org .junit .Before ;
17- import org .junit .Ignore ;
1817import org .junit .Rule ;
1918import org .junit .Test ;
2019import org .junit .runner .RunWith ;
2120
2221@ RunWith (AndroidJUnit4 .class )
2322@ LargeTest
24- @ Ignore ("Test fails with java.lang.UnsupportedOperationException" )
2523public class ExternalTextureTests {
2624 private static final int SURFACE_WIDTH = 192 ;
2725 private static final int SURFACE_HEIGHT = 256 ;
@@ -42,7 +40,7 @@ public void setUp() {
4240
4341 @ Test
4442 public void testCanvasSurface () throws Exception {
45- intent .putExtra ("scenario " , "display_texture" );
43+ intent .putExtra ("scenario_name " , "display_texture" );
4644 intent .putExtra ("surface_renderer" , "canvas" );
4745 ScreenshotUtil .capture (
4846 activityRule .launchActivity (intent ), "ExternalTextureTests_testCanvasSurface" );
@@ -51,7 +49,7 @@ public void testCanvasSurface() throws Exception {
5149 @ Test
5250 @ SdkSuppress (minSdkVersion = VERSION_CODES .LOLLIPOP )
5351 public void testMediaSurface () throws Exception {
54- intent .putExtra ("scenario " , "display_texture" );
52+ intent .putExtra ("scenario_name " , "display_texture" );
5553 intent .putExtra ("surface_renderer" , "media" );
5654 ScreenshotUtil .capture (
5755 activityRule .launchActivity (intent ), "ExternalTextureTests_testMediaSurface" );
@@ -60,7 +58,7 @@ public void testMediaSurface() throws Exception {
6058 @ Test
6159 @ SdkSuppress (minSdkVersion = VERSION_CODES .LOLLIPOP )
6260 public void testRotatedMediaSurface_90 () throws Exception {
63- intent .putExtra ("scenario " , "display_texture" );
61+ intent .putExtra ("scenario_name " , "display_texture" );
6462 intent .putExtra ("surface_renderer" , "media" );
6563 intent .putExtra ("rotation" , 90 );
6664 ScreenshotUtil .capture (
@@ -70,7 +68,7 @@ public void testRotatedMediaSurface_90() throws Exception {
7068 @ Test
7169 @ SdkSuppress (minSdkVersion = VERSION_CODES .LOLLIPOP )
7270 public void testRotatedMediaSurface_180 () throws Exception {
73- intent .putExtra ("scenario " , "display_texture" );
71+ intent .putExtra ("scenario_name " , "display_texture" );
7472 intent .putExtra ("surface_renderer" , "media" );
7573 intent .putExtra ("rotation" , 180 );
7674 ScreenshotUtil .capture (
@@ -80,7 +78,7 @@ public void testRotatedMediaSurface_180() throws Exception {
8078 @ Test
8179 @ SdkSuppress (minSdkVersion = VERSION_CODES .LOLLIPOP )
8280 public void testRotatedMediaSurface_270 () throws Exception {
83- intent .putExtra ("scenario " , "display_texture" );
81+ intent .putExtra ("scenario_name " , "display_texture" );
8482 intent .putExtra ("surface_renderer" , "media" );
8583 intent .putExtra ("rotation" , 270 );
8684 ScreenshotUtil .capture (
@@ -90,7 +88,7 @@ public void testRotatedMediaSurface_270() throws Exception {
9088 @ Test
9189 @ SdkSuppress (minSdkVersion = VERSION_CODES .M )
9290 public void testCroppedMediaSurface_bottomLeft () throws Exception {
93- intent .putExtra ("scenario " , "display_texture" );
91+ intent .putExtra ("scenario_name " , "display_texture" );
9492 intent .putExtra ("surface_renderer" , "image" );
9593 intent .putExtra ("crop" , new Rect (0 , 0 , SURFACE_WIDTH / 2 , SURFACE_HEIGHT / 2 ));
9694 ScreenshotUtil .capture (
@@ -101,7 +99,7 @@ public void testCroppedMediaSurface_bottomLeft() throws Exception {
10199 @ Test
102100 @ SdkSuppress (minSdkVersion = VERSION_CODES .M )
103101 public void testCroppedMediaSurface_topRight () throws Exception {
104- intent .putExtra ("scenario " , "display_texture" );
102+ intent .putExtra ("scenario_name " , "display_texture" );
105103 intent .putExtra ("surface_renderer" , "image" );
106104 intent .putExtra (
107105 "crop" , new Rect (SURFACE_WIDTH / 2 , SURFACE_HEIGHT / 2 , SURFACE_WIDTH , SURFACE_HEIGHT ));
@@ -113,7 +111,7 @@ public void testCroppedMediaSurface_topRight() throws Exception {
113111 @ Test
114112 @ SdkSuppress (minSdkVersion = VERSION_CODES .M )
115113 public void testCroppedRotatedMediaSurface_bottomLeft_90 () throws Exception {
116- intent .putExtra ("scenario " , "display_texture" );
114+ intent .putExtra ("scenario_name " , "display_texture" );
117115 intent .putExtra ("surface_renderer" , "image" );
118116 intent .putExtra ("crop" , new Rect (0 , 0 , SURFACE_WIDTH / 2 , SURFACE_HEIGHT / 2 ));
119117 intent .putExtra ("rotation" , 90 );
0 commit comments