v1.12.13+hotfix.6 cherry-picks (#46741)

* b63683b Update configuration for flutter features
This commit is contained in:
Todd Volkert 2019-12-11 06:35:39 -08:00 committed by GitHub
parent 27321ebbad
commit 18cd7a3601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -91,6 +91,10 @@ const Feature flutterWebFeature = Feature(
available: true,
enabledByDefault: false,
),
beta: FeatureChannelSetting(
available: true,
enabledByDefault: false,
),
);
/// The [Feature] for macOS desktop.

View File

@ -78,7 +78,7 @@ void main() {
}));
test('flutter web help string', () {
expect(flutterWebFeature.generateHelpMessage(), 'Enable or disable Flutter for web. This setting will take effect on the master and dev channels.');
expect(flutterWebFeature.generateHelpMessage(), 'Enable or disable Flutter for web. This setting will take effect on the master, dev, and beta channels.');
});
test('flutter macOS desktop help string', () {
@ -155,18 +155,18 @@ void main() {
expect(featureFlags.isWebEnabled, false);
}));
test('flutter web not enabled with config on beta', () => testbed.run(() {
test('flutter web enabled with config on beta', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('beta');
when<bool>(mockFlutterConfig.getValue('enable-web') as bool).thenReturn(true);
expect(featureFlags.isWebEnabled, false);
expect(featureFlags.isWebEnabled, true);
}));
test('flutter web not enabled with environment variable on beta', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('beta');
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WEB': 'true'});
expect(featureFlags.isWebEnabled, false);
expect(featureFlags.isWebEnabled, true);
}));
test('flutter web off by default on stable', () => testbed.run(() {