Move robolectric tests to sdk 28 (#18525)

This commit is contained in:
xster 2020-05-20 09:19:35 -07:00 committed by GitHub
parent 3daf721d37
commit 33ea63fbbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 10 deletions

2
DEPS
View File

@ -502,7 +502,7 @@ deps = {
'packages': [
{
'package': 'flutter/android/embedding_bundle',
'version': 'last_updated:2020-03-13T15:42:26-0700'
'version': 'last_updated:2020-05-20T01:36:16-0700'
}
],
'condition': 'download_android_deps',

View File

@ -37,7 +37,7 @@ configurations {
}
android {
compileSdkVersion 28
compileSdkVersion 29
dependencies {
embedding "androidx.annotation:annotation:1.1.0"
@ -52,7 +52,7 @@ android {
// TODO(xster): remove these android-all compile time dependencies.
// Use https://github.com/robolectric/robolectric/blob/master/robolectric/src/main/java/org/robolectric/plugins/LegacyDependencyResolver.java#L24
// and specify them as runtime dependencies.
embeddingTesting "org.robolectric:android-all:8.1.0-robolectric-4611349"
embeddingTesting "org.robolectric:android-all:9-robolectric-4913185-2"
// Get robolectric shadows for SDK=16 used by PlatformPluginTest.
embeddingTesting_v16 "org.robolectric:android-all:4.1.2_r1-robolectric-r1"
embeddingTesting "androidx.fragment:fragment-testing:1.1.0"

View File

@ -1,2 +1,4 @@
# Match the value at shell/platform/android/embedding_bundle/build.gradle.
sdk=29
# TODO(https://github.com/flutter/flutter/issues/57655): figure out
# what's wrong with sdk=29.
sdk=28

View File

@ -42,7 +42,7 @@ import org.robolectric.shadows.ShadowDisplay;
@Config(manifest = Config.NONE)
@RunWith(RobolectricTestRunner.class)
@TargetApi(29)
@TargetApi(28)
public class FlutterViewTest {
@Mock FlutterJNI mockFlutterJni;
@Mock FlutterLoader mockFlutterLoader;

View File

@ -34,7 +34,7 @@ import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowClipboardManager;
@Config(manifest = Config.NONE, sdk = 27, shadows = ShadowClipboardManager.class)
@Config(manifest = Config.NONE, shadows = ShadowClipboardManager.class)
@RunWith(RobolectricTestRunner.class)
public class InputConnectionAdaptorTest {
@Test

View File

@ -52,7 +52,7 @@ import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowBuild;
import org.robolectric.shadows.ShadowInputMethodManager;
@Config(manifest = Config.NONE, shadows = TextInputPluginTest.TestImm.class, sdk = 27)
@Config(manifest = Config.NONE, shadows = TextInputPluginTest.TestImm.class)
@RunWith(RobolectricTestRunner.class)
public class TextInputPluginTest {
// Verifies the method and arguments for a captured method call.

View File

@ -21,10 +21,9 @@ import org.robolectric.shadows.ShadowInputMethodManager;
@Config(
manifest = Config.NONE,
shadows = {ShadowInputMethodManager.class, ShadowDisplayManager.class, ShadowDisplay.class},
sdk = 27)
shadows = {ShadowInputMethodManager.class, ShadowDisplayManager.class, ShadowDisplay.class})
@RunWith(RobolectricTestRunner.class)
@TargetApi(27)
@TargetApi(28)
public class SingleViewPresentationTest {
@Test
public void returnsOuterContextInputMethodManager() {