remove extra redundant channels setup in iOS embedding engine (#11886)

This commit is contained in:
xster
2019-09-05 11:13:04 -07:00
committed by GitHub
parent 4243324a03
commit dd71e7be8e
2 changed files with 19 additions and 1 deletions
@@ -93,7 +93,6 @@
_pluginPublications = [NSMutableDictionary new];
_platformViewsController.reset(new flutter::FlutterPlatformViewsController());
[self setupChannels];
_binaryMessenger = [[FlutterBinaryMessengerRelay alloc] initWithParent:self];
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
@@ -28,4 +28,23 @@
XCTAssertNil(engine.isolateId);
}
- (void)testChannelSetup {
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"test" project:nil];
XCTAssertNil(engine.navigationChannel);
XCTAssertNil(engine.platformChannel);
XCTAssertNil(engine.lifecycleChannel);
XCTAssertTrue([engine runWithEntrypoint:nil]);
XCTAssertNotNil(engine.navigationChannel);
XCTAssertNotNil(engine.platformChannel);
XCTAssertNotNil(engine.lifecycleChannel);
[engine destroyContext];
XCTAssertNil(engine.navigationChannel);
XCTAssertNil(engine.platformChannel);
XCTAssertNil(engine.lifecycleChannel);
}
@end