Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
69dfefb
Remove usages of deprecated junit.framework and replace with org.juni…
reidbaker Aug 22, 2023
5925883
Annotate deprecated usages of Registrar
reidbaker Aug 22, 2023
b3ada37
Suppress warnings for getSystemWindowInsets and ensure roboletric con…
reidbaker Aug 22, 2023
1f2bc15
Suppress warnings for DartExecutor.send
reidbaker Aug 22, 2023
0d3b2b0
Suppress warnings for ClipboardManager.set/hasText
reidbaker Aug 22, 2023
9f2b588
Suppress warnings for getWindowSystemUiVisibility, setMessageHandler,…
reidbaker Aug 22, 2023
86eb955
Suppress deprecation warnings, set minsdk on tests that were checking…
reidbaker Aug 22, 2023
8a482fc
Suppress deprecation warnings in SpellCheckPluginTest
reidbaker Aug 22, 2023
fb7272d
Suppress deprecation warnings in MouseCursorPluginTest, set minsdk co…
reidbaker Aug 22, 2023
90f6ce0
Stop calling RuntimeEnvrionment.application and insted a call Applica…
reidbaker Aug 22, 2023
d32d874
Start calling FlutterView(Context, FlutterSurfaceView)
reidbaker Aug 22, 2023
7c65622
Suppress deprecation warnings in PlatformPluginTest, getText, Robolec…
reidbaker Aug 22, 2023
3ba9a98
Suppress deprecation warnings in PlayStoreDeferredComponentManagerTest
reidbaker Aug 22, 2023
488c707
Suppress deprecation warnings in KeyboardChannelTest
reidbaker Aug 22, 2023
78d6b79
Suppress deprecation warnings in SettingsChannelTest
reidbaker Aug 22, 2023
0c14a63
Suppress deprecation warnings in ApplicationInfoLoaderTest
reidbaker Aug 22, 2023
7eb6b01
Stop calling RuntimeEnvrionment.application and insted a call Applica…
reidbaker Aug 22, 2023
e58f957
Suppress deprecation warnings in FlutterAndroidComponentTest
reidbaker Aug 22, 2023
fb86f96
Suppress deprecation warnings in FlutterFragmentTest, more robolectri…
reidbaker Aug 22, 2023
e987bc2
Suppress deprecation warnings in FlutterActivityAndFragmentDelegateTest
reidbaker Aug 22, 2023
86d08f5
Shadow.directlyOn is incompatible with java 17+,
reidbaker Aug 22, 2023
81cd095
Enable warnings as errors
reidbaker Aug 22, 2023
6142bf2
Formatting
reidbaker Aug 22, 2023
1ea2739
Add todo for roboletric setupActivity method and remove supression fr…
reidbaker Aug 23, 2023
e281c25
Add todo for expanding linter coverage and refactor method to reduce …
reidbaker Aug 23, 2023
28af640
Refactor deprecated method to extract smallest part
reidbaker Aug 23, 2023
823d26d
Merge branch 'main' into i133070-android-test-logspam-2
reidbaker Aug 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,11 @@ public void itReturnsExclusiveAppComponent() {
}

@SuppressWarnings("deprecation")
// Robolectric.setupActivity
// TODO(reidbaker): https://github.com/flutter/flutter/issues/133151
private FragmentActivity getMockFragmentActivity() {
// TODO(reidbaker): https://github.com/flutter/flutter/issues/133151
return Robolectric.setupActivity(FragmentActivity.class);
}

@Test
public void itDelegatesOnBackPressedAutomaticallyWhenEnabled() {
// We need to mock FlutterJNI to avoid triggering native code.
Expand All @@ -300,7 +303,7 @@ public void itDelegatesOnBackPressedAutomaticallyWhenEnabled() {
FlutterFragment.withCachedEngine("my_cached_engine")
.shouldAutomaticallyHandleOnBackPressed(true)
.build();
FragmentActivity activity = Robolectric.setupActivity(FragmentActivity.class);
FragmentActivity activity = getMockFragmentActivity();
activity
.getSupportFragmentManager()
.beginTransaction()
Expand Down Expand Up @@ -337,7 +340,7 @@ public void itHandlesPopSystemNavigationAutomaticallyWhenEnabled() {
FlutterFragment.withCachedEngine("my_cached_engine")
.shouldAutomaticallyHandleOnBackPressed(true)
.build();
FragmentActivity activity = Robolectric.setupActivity(FragmentActivity.class);
FragmentActivity activity = getMockFragmentActivity();
activity
.getSupportFragmentManager()
.beginTransaction()
Expand Down