mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
remove extra redundant channels setup in iOS embedding engine (#11886)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user