未验证 提交 dd71e7be 编写于 作者: X xster 提交者: GitHub

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

上级 4243324a
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册