forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose isolateId for engine (flutter#10823)
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
testing/scenario_app/ios/Scenarios/ScenariosTests/FlutterEngineTest.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#import <Flutter/Flutter.h> | ||
#import <XCTest/XCTest.h> | ||
#import "AppDelegate.h" | ||
|
||
@interface FlutterEngineTest : XCTestCase | ||
@end | ||
|
||
@implementation FlutterEngineTest | ||
|
||
- (void)testIsolateId { | ||
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"test" project:nil]; | ||
XCTAssertNil(engine.isolateId); | ||
[self keyValueObservingExpectationForObject:engine keyPath:@"isolateId" handler:nil]; | ||
|
||
XCTAssertTrue([engine runWithEntrypoint:nil]); | ||
|
||
[self waitForExpectationsWithTimeout:30.0 handler:nil]; | ||
|
||
XCTAssertNotNil(engine.isolateId); | ||
XCTAssertTrue([engine.isolateId hasPrefix:@"isolates/"]); | ||
|
||
[engine destroyContext]; | ||
|
||
XCTAssertNil(engine.isolateId); | ||
} | ||
|
||
@end |