mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
v1.12.13+hotfix.6 cherry-picks (#46741)
* b63683b Update configuration for flutter features
This commit is contained in:
parent
27321ebbad
commit
18cd7a3601
@ -91,6 +91,10 @@ const Feature flutterWebFeature = Feature(
|
||||
available: true,
|
||||
enabledByDefault: false,
|
||||
),
|
||||
beta: FeatureChannelSetting(
|
||||
available: true,
|
||||
enabledByDefault: false,
|
||||
),
|
||||
);
|
||||
|
||||
/// The [Feature] for macOS desktop.
|
||||
|
||||
@ -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(() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user