Added plist flag for enabling trace-systrace. (flutter/engine#33889)
This commit is contained in:
@@ -167,6 +167,12 @@ flutter::Settings FLTDefaultSettingsForBundle(NSBundle* bundle) {
|
||||
settings.enable_impeller = enableImpeller.boolValue;
|
||||
}
|
||||
|
||||
NSNumber* enableTraceSystrace = [mainBundle objectForInfoDictionaryKey:@"FLTTraceSystrace"];
|
||||
// Change the default only if the option is present.
|
||||
if (enableTraceSystrace != nil) {
|
||||
settings.trace_systrace = enableTraceSystrace.boolValue;
|
||||
}
|
||||
|
||||
// Leak Dart VM settings, set whether leave or clean up the VM after the last shell shuts down.
|
||||
NSNumber* leakDartVM = [mainBundle objectForInfoDictionaryKey:@"FLTLeakDartVM"];
|
||||
// It will change the default leak_vm value in settings only if the key exists.
|
||||
|
||||
@@ -71,6 +71,15 @@ FLUTTER_ASSERT_ARC
|
||||
XCTAssertEqual(settings.enable_impeller, NO);
|
||||
}
|
||||
|
||||
- (void)testEnableTraceSystraceSettingIsCorrectlyParsed {
|
||||
NSBundle* mainBundle = [NSBundle mainBundle];
|
||||
NSNumber* enableTraceSystrace = [mainBundle objectForInfoDictionaryKey:@"FLTTraceSystrace"];
|
||||
XCTAssertNotNil(enableTraceSystrace);
|
||||
XCTAssertEqual(enableTraceSystrace.boolValue, NO);
|
||||
auto settings = FLTDefaultSettingsForBundle();
|
||||
XCTAssertEqual(settings.trace_systrace, NO);
|
||||
}
|
||||
|
||||
- (void)testEmptySettingsAreCorrect {
|
||||
XCTAssertFalse([FlutterDartProject allowsArbitraryLoads:[[NSDictionary alloc] init]]);
|
||||
XCTAssertEqualObjects(@"", [FlutterDartProject domainNetworkPolicy:[[NSDictionary alloc] init]]);
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
<false/>
|
||||
<key>FLTEnableImpeller</key>
|
||||
<false/>
|
||||
<key>FLTTraceSystrace</key>
|
||||
<false/>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
|
||||
Reference in New Issue
Block a user