Skip to content

Commit

Permalink
Fix testsg
Browse files Browse the repository at this point in the history
Rework test

Compile

Fix
  • Loading branch information
GaryQian committed Jul 11, 2020
1 parent a2fb1b4 commit ffed839
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ public void itStopsSurfaceTextureCallbackWhenDetached() {
// Setup the test.
FlutterRenderer flutterRenderer = new FlutterRenderer(fakeFlutterJNI);

flutterRenderer.startRenderingToSurface(fakeSurface);
flutterRenderer.stopRenderingToSurface();

fakeFlutterJNI.detachFromNativeAndReleaseResources();

FlutterRenderer.SurfaceTextureRegistryEntry entry = (FlutterRenderer.SurfaceTextureRegistryEntry)flutterRenderer.createSurfaceTexture();

flutterRenderer.startRenderingToSurface(fakeSurface);

// Execute the behavior under test.
flutterRenderer.stopRenderingToSurface();

// Verify behavior under test.
verify(fakeFlutterJNI, times(1)).markTextureFrameAvailable();
verify(fakeFlutterJNI, times(0)).markTextureFrameAvailable(eq(entry.id()));
}
}

0 comments on commit ffed839

Please sign in to comment.