Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -65,13 +65,13 @@ public void tearDown() {
}

@Test
public void createFlutterFragment__defaultRenderModeSurface() {
public void createFlutterFragment_defaultRenderModeSurface() {
final FlutterFragmentActivity activity = new FakeFlutterFragmentActivity();
assertEquals(activity.createFlutterFragment().getRenderMode(), RenderMode.surface);
}

@Test
public void createFlutterFragment__defaultRenderModeTexture() {
public void createFlutterFragment_defaultRenderModeTexture() {
final FlutterFragmentActivity activity =
new FakeFlutterFragmentActivity() {
@Override
Expand All @@ -83,7 +83,7 @@ protected BackgroundMode getBackgroundMode() {
}

@Test
public void createFlutterFragment__customRenderMode() {
public void createFlutterFragment_customRenderMode() {
final FlutterFragmentActivity activity =
new FakeFlutterFragmentActivity() {
@Override
Expand All @@ -95,7 +95,7 @@ protected RenderMode getRenderMode() {
}

@Test
public void createFlutterFragment__customDartEntrypointLibraryUri() {
public void createFlutterFragment_customDartEntrypointLibraryUri() {
final FlutterFragmentActivity activity =
new FakeFlutterFragmentActivity() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void computePlatformResolvedLocaleCallsLocalizationPluginProperly() {
assertEquals(result[2], "");
}

public void onDisplayPlatformView__callsPlatformViewsController() {
public void onDisplayPlatformView_callsPlatformViewsController() {
PlatformViewsController platformViewsController = mock(PlatformViewsController.class);

FlutterJNI flutterJNI = new FlutterJNI();
Expand Down Expand Up @@ -181,7 +181,7 @@ public void onDisplayPlatformView__callsPlatformViewsController() {
}

@Test
public void onDisplayOverlaySurface__callsPlatformViewsController() {
public void onDisplayOverlaySurface_callsPlatformViewsController() {
PlatformViewsController platformViewsController = mock(PlatformViewsController.class);

FlutterJNI flutterJNI = new FlutterJNI();
Expand All @@ -197,7 +197,7 @@ public void onDisplayOverlaySurface__callsPlatformViewsController() {
}

@Test
public void onBeginFrame__callsPlatformViewsController() {
public void onBeginFrame_callsPlatformViewsController() {
PlatformViewsController platformViewsController = mock(PlatformViewsController.class);

// --- Test Setup ---
Expand All @@ -212,7 +212,7 @@ public void onBeginFrame__callsPlatformViewsController() {
}

@Test
public void onEndFrame__callsPlatformViewsController() {
public void onEndFrame_callsPlatformViewsController() {
PlatformViewsController platformViewsController = mock(PlatformViewsController.class);

// --- Test Setup ---
Expand All @@ -227,7 +227,7 @@ public void onEndFrame__callsPlatformViewsController() {
}

@Test
public void createOverlaySurface__callsPlatformViewsController() {
public void createOverlaySurface_callsPlatformViewsController() {
PlatformViewsController platformViewsController = mock(PlatformViewsController.class);

FlutterJNI flutterJNI = new FlutterJNI();
Expand All @@ -241,14 +241,14 @@ public void createOverlaySurface__callsPlatformViewsController() {
}

@Test(expected = IllegalArgumentException.class)
public void invokePlatformMessageResponseCallback__wantsDirectBuffer() {
public void invokePlatformMessageResponseCallback_wantsDirectBuffer() {
FlutterJNI flutterJNI = new FlutterJNI();
ByteBuffer buffer = ByteBuffer.allocate(4);
flutterJNI.invokePlatformMessageResponseCallback(0, buffer, buffer.position());
}

@Test
public void setRefreshRateFPS__callsUpdateRefreshRate() {
public void setRefreshRateFPS_callsUpdateRefreshRate() {
FlutterJNI flutterJNI = spy(new FlutterJNI());
// --- Execute Test ---
flutterJNI.setRefreshRateFPS(120.0f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public void itUsesActionEventTypeFromMotionEventForHybridPlatformViews() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void getPlatformViewById__hybridComposition() {
public void getPlatformViewById_hybridComposition() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand Down Expand Up @@ -296,7 +296,7 @@ public void getPlatformViewById__hybridComposition() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__initializesAndroidView() {
public void createPlatformViewMessage_initializesAndroidView() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand All @@ -318,7 +318,7 @@ public void createPlatformViewMessage__initializesAndroidView() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__wrapsContextForVirtualDisplay() {
public void createPlatformViewMessage_wrapsContextForVirtualDisplay() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand All @@ -343,7 +343,7 @@ public void createPlatformViewMessage__wrapsContextForVirtualDisplay() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__doesNotWrapContextForHybrid() {
public void createPlatformViewMessage_doesNotWrapContextForHybrid() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand All @@ -367,7 +367,7 @@ public void createPlatformViewMessage__doesNotWrapContextForHybrid() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__setsAndroidViewLayoutDirection() {
public void createPlatformViewMessage_setsAndroidViewLayoutDirection() {
PlatformViewsController platformViewsController = new PlatformViewsController();
platformViewsController.setSoftwareRendering(true);

Expand All @@ -393,7 +393,7 @@ public void createPlatformViewMessage__setsAndroidViewLayoutDirection() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__setsAndroidViewSize() {
public void createPlatformViewMessage_setsAndroidViewSize() {
PlatformViewsController platformViewsController = new PlatformViewsController();
platformViewsController.setSoftwareRendering(true);

Expand Down Expand Up @@ -426,7 +426,7 @@ public void createPlatformViewMessage__setsAndroidViewSize() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__disablesAccessibility() {
public void createPlatformViewMessage_disablesAccessibility() {
PlatformViewsController platformViewsController = new PlatformViewsController();
platformViewsController.setSoftwareRendering(true);

Expand All @@ -453,7 +453,7 @@ public void createPlatformViewMessage__disablesAccessibility() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__throwsIfViewIsNull() {
public void createPlatformViewMessage_throwsIfViewIsNull() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand Down Expand Up @@ -482,7 +482,7 @@ public void createPlatformViewMessage__throwsIfViewIsNull() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createHybridPlatformViewMessage__throwsIfViewIsNull() {
public void createHybridPlatformViewMessage_throwsIfViewIsNull() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand Down Expand Up @@ -574,7 +574,7 @@ public void onPreEngineRestart_clearsPlatformViewContext() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createPlatformViewMessage__throwsIfViewHasParent() {
public void createPlatformViewMessage_throwsIfViewHasParent() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand Down Expand Up @@ -605,7 +605,7 @@ public void createPlatformViewMessage__throwsIfViewHasParent() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void createHybridPlatformViewMessage__throwsIfViewHasParent() {
public void createHybridPlatformViewMessage_throwsIfViewHasParent() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand Down Expand Up @@ -635,7 +635,7 @@ public void createHybridPlatformViewMessage__throwsIfViewHasParent() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void setPlatformViewDirection__throwIfPlatformViewNotFound() {
public void setPlatformViewDirection_throwIfPlatformViewNotFound() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand Down Expand Up @@ -706,7 +706,7 @@ public void resizeAndroidView() {

@Test
@Config(shadows = {ShadowFlutterJNI.class, ShadowPlatformTaskQueue.class})
public void disposeAndroidView__hybridComposition() {
public void disposeAndroidView_hybridComposition() {
PlatformViewsController platformViewsController = new PlatformViewsController();

int platformViewId = 0;
Expand Down Expand Up @@ -803,7 +803,7 @@ public void disposeNullAndroidView() {
ShadowFlutterJNI.class,
ShadowPlatformTaskQueue.class
})
public void onEndFrame__destroysOverlaySurfaceAfterFrameOnFlutterSurfaceView() {
public void onEndFrame_destroysOverlaySurfaceAfterFrameOnFlutterSurfaceView() {
final PlatformViewsController platformViewsController = new PlatformViewsController();

final int platformViewId = 0;
Expand Down Expand Up @@ -862,7 +862,7 @@ public void onEndFrame__destroysOverlaySurfaceAfterFrameOnFlutterSurfaceView() {

@Test
@Config(shadows = {ShadowFlutterSurfaceView.class, ShadowFlutterJNI.class})
public void onEndFrame__removesPlatformView() {
public void onEndFrame_removesPlatformView() {
final PlatformViewsController platformViewsController = new PlatformViewsController();

final int platformViewId = 0;
Expand Down Expand Up @@ -903,7 +903,7 @@ public void onEndFrame__removesPlatformView() {
ShadowFlutterJNI.class,
ShadowPlatformTaskQueue.class
})
public void onEndFrame__removesPlatformViewParent() {
public void onEndFrame_removesPlatformViewParent() {
final PlatformViewsController platformViewsController = new PlatformViewsController();

final int platformViewId = 0;
Expand Down Expand Up @@ -946,7 +946,7 @@ public void onEndFrame__removesPlatformViewParent() {
ShadowFlutterJNI.class,
ShadowPlatformTaskQueue.class
})
public void detach__destroysOverlaySurfaces() {
public void detach_destroysOverlaySurfaces() {
final PlatformViewsController platformViewsController = new PlatformViewsController();

final int platformViewId = 0;
Expand Down Expand Up @@ -997,7 +997,7 @@ public void detach__destroysOverlaySurfaces() {

@Test
@Config(shadows = {ShadowFlutterSurfaceView.class, ShadowFlutterJNI.class})
public void detachFromView__removesAndDestroysOverlayViews() {
public void detachFromView_removesAndDestroysOverlayViews() {
final PlatformViewsController platformViewsController = new PlatformViewsController();

final int platformViewId = 0;
Expand Down Expand Up @@ -1035,7 +1035,7 @@ public void detachFromView__removesAndDestroysOverlayViews() {

@Test
@Config(shadows = {ShadowFlutterSurfaceView.class, ShadowFlutterJNI.class})
public void destroyOverlaySurfaces__doesNotThrowIfFlutterViewIsDetached() {
public void destroyOverlaySurfaces_doesNotThrowIfFlutterViewIsDetached() {
final PlatformViewsController platformViewsController = new PlatformViewsController();

final int platformViewId = 0;
Expand Down Expand Up @@ -1073,7 +1073,7 @@ public void destroyOverlaySurfaces__doesNotThrowIfFlutterViewIsDetached() {

@Test
@Config(shadows = {ShadowFlutterSurfaceView.class, ShadowFlutterJNI.class})
public void destroyOverlaySurfaces__doesNotRemoveOverlayView() {
public void destroyOverlaySurfaces_doesNotRemoveOverlayView() {
final PlatformViewsController platformViewsController = new PlatformViewsController();

final int platformViewId = 0;
Expand Down Expand Up @@ -1107,7 +1107,7 @@ public void destroyOverlaySurfaces__doesNotRemoveOverlayView() {
}

@Test
public void checkInputConnectionProxy__falseIfViewIsNull() {
public void checkInputConnectionProxy_falseIfViewIsNull() {
final PlatformViewsController platformViewsController = new PlatformViewsController();
boolean shouldProxying = platformViewsController.checkInputConnectionProxy(null);
assertFalse(shouldProxying);
Expand Down