5#import <Flutter/Flutter.h>
6#import <XCTest/XCTest.h>
17- (void)testIsolateId {
20 [
self keyValueObservingExpectationForObject:engine keyPath:@"isolateId" handler:nil];
22 XCTAssertTrue([
engine runWithEntrypoint:nil]);
24 [
self waitForExpectationsWithTimeout:30.0 handler:nil];
34- (void)testChannelSetup {
40 XCTAssertTrue([
engine run]);
54- (void)testReleaseViewControllerAfterDestroyContextInHeadlessMode {
57 allowHeadlessExecution:YES];
62 XCTAssertTrue([
engine run]);
67 XCTestExpectation* expectation =
68 [[XCTestExpectation alloc] initWithDescription:@"notification called"];
73 [engine setViewController:viewController];
75 [[NSNotificationCenter defaultCenter] addObserverForName:FlutterViewControllerWillDealloc
77 queue:[NSOperationQueue mainQueue]
78 usingBlock:^(NSNotification* _Nonnull note) {
79 [expectation fulfill];
83 [
self waitForExpectations:@[ expectation ] timeout:30.0];
NSNotificationName const FlutterViewControllerWillDealloc
FlutterMethodChannel * navigationChannel
FlutterBasicMessageChannel * lifecycleChannel
FlutterMethodChannel * platformChannel
FlutterViewController * viewController