Use config to set land qualifiers (flutter/engine#31853)
Signed-off-by: utzcoz <utzcoz@outlook.com>
This commit is contained in:
@@ -512,9 +512,8 @@ public class FlutterViewTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(minSdk = 23, maxSdk = 29)
|
||||
@Config(minSdk = 23, maxSdk = 29, qualifiers = "land")
|
||||
public void systemInsetHandlesFullscreenNavbarRight() {
|
||||
RuntimeEnvironment.setQualifiers("+land");
|
||||
FlutterView flutterView = spy(new FlutterView(RuntimeEnvironment.systemContext));
|
||||
setExpectedDisplayRotation(Surface.ROTATION_90);
|
||||
assertEquals(0, flutterView.getSystemUiVisibility());
|
||||
@@ -550,9 +549,8 @@ public class FlutterViewTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(minSdk = 20, maxSdk = 22)
|
||||
@Config(minSdk = 20, maxSdk = 22, qualifiers = "land")
|
||||
public void systemInsetHandlesFullscreenNavbarRightBelowSDK23() {
|
||||
RuntimeEnvironment.setQualifiers("+land");
|
||||
FlutterView flutterView = spy(new FlutterView(RuntimeEnvironment.systemContext));
|
||||
setExpectedDisplayRotation(Surface.ROTATION_270);
|
||||
assertEquals(0, flutterView.getSystemUiVisibility());
|
||||
@@ -588,9 +586,8 @@ public class FlutterViewTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Config(minSdk = 23, maxSdk = 29)
|
||||
@Config(minSdk = 23, maxSdk = 29, qualifiers = "land")
|
||||
public void systemInsetHandlesFullscreenNavbarLeft() {
|
||||
RuntimeEnvironment.setQualifiers("+land");
|
||||
FlutterView flutterView = spy(new FlutterView(RuntimeEnvironment.systemContext));
|
||||
setExpectedDisplayRotation(Surface.ROTATION_270);
|
||||
assertEquals(0, flutterView.getSystemUiVisibility());
|
||||
@@ -629,9 +626,8 @@ public class FlutterViewTest {
|
||||
// set to -1 values, so it is clear if the wrong algorithm is used.
|
||||
@Test
|
||||
@TargetApi(30)
|
||||
@Config(sdk = 30)
|
||||
@Config(sdk = 30, qualifiers = "land")
|
||||
public void systemInsetGetInsetsFullscreen() {
|
||||
RuntimeEnvironment.setQualifiers("+land");
|
||||
FlutterView flutterView = spy(new FlutterView(RuntimeEnvironment.systemContext));
|
||||
setExpectedDisplayRotation(Surface.ROTATION_270);
|
||||
assertEquals(0, flutterView.getSystemUiVisibility());
|
||||
@@ -667,9 +663,8 @@ public class FlutterViewTest {
|
||||
// This test uses the pre-API 30 Algorithm for window insets.
|
||||
@Test
|
||||
@TargetApi(28)
|
||||
@Config(sdk = 28)
|
||||
@Config(sdk = 28, qualifiers = "land")
|
||||
public void systemInsetGetInsetsFullscreenLegacy() {
|
||||
RuntimeEnvironment.setQualifiers("+land");
|
||||
FlutterView flutterView = spy(new FlutterView(RuntimeEnvironment.systemContext));
|
||||
setExpectedDisplayRotation(Surface.ROTATION_270);
|
||||
assertEquals(0, flutterView.getSystemUiVisibility());
|
||||
@@ -707,9 +702,8 @@ public class FlutterViewTest {
|
||||
// set to -1 values, so it is clear if the wrong algorithm is used.
|
||||
@Test
|
||||
@TargetApi(30)
|
||||
@Config(sdk = 30)
|
||||
@Config(sdk = 30, qualifiers = "land")
|
||||
public void systemInsetDisplayCutoutSimple() {
|
||||
RuntimeEnvironment.setQualifiers("+land");
|
||||
FlutterView flutterView = spy(new FlutterView(RuntimeEnvironment.systemContext));
|
||||
assertEquals(0, flutterView.getSystemUiVisibility());
|
||||
when(flutterView.getWindowSystemUiVisibility()).thenReturn(0);
|
||||
|
||||
Reference in New Issue
Block a user