Skip to content

Commit

Permalink
Handle null platform plugin delegate for v1 embedding (flutter#22853)
Browse files Browse the repository at this point in the history
  • Loading branch information
xster authored Dec 4, 2020
1 parent 6a5971d commit 6ab050b
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,15 @@ public void setRequestedOrientationFlutterFragment() {

verify(mockFragmentActivity, times(1)).setRequestedOrientation(0);
}

@Test
public void performsDefaultBehaviorWhenNoDelegateProvided() {
Activity mockActivity = mock(Activity.class);
PlatformChannel mockPlatformChannel = mock(PlatformChannel.class);
PlatformPlugin platformPlugin = new PlatformPlugin(mockActivity, mockPlatformChannel);

platformPlugin.mPlatformMessageHandler.popSystemNavigator();

verify(mockActivity, times(1)).finish();
}
}

0 comments on commit 6ab050b

Please sign in to comment.