Unverified Commit bc11c2a8 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] update windows config feature (#65867)

parent 50fd10fc
...@@ -173,6 +173,10 @@ const Feature flutterWindowsDesktopFeature = Feature( ...@@ -173,6 +173,10 @@ const Feature flutterWindowsDesktopFeature = Feature(
available: true, available: true,
enabledByDefault: false, enabledByDefault: false,
), ),
dev: FeatureChannelSetting(
available: true,
enabledByDefault: false,
),
); );
/// The [Feature] for Android devices. /// The [Feature] for Android devices.
......
...@@ -98,7 +98,7 @@ void main() { ...@@ -98,7 +98,7 @@ void main() {
test('flutter Windows desktop help string', () { test('flutter Windows desktop help string', () {
expect(flutterWindowsDesktopFeature.generateHelpMessage(), expect(flutterWindowsDesktopFeature.generateHelpMessage(),
'Enable or disable Flutter for desktop on Windows. ' 'Enable or disable Flutter for desktop on Windows. '
'This setting will take effect on the master channel.'); 'This setting will take effect on the master and dev channels.');
}); });
test('help string on multiple channels', () { test('help string on multiple channels', () {
...@@ -387,18 +387,18 @@ void main() { ...@@ -387,18 +387,18 @@ void main() {
expect(featureFlags.isWindowsEnabled, false); expect(featureFlags.isWindowsEnabled, false);
})); }));
test('flutter windows desktop not enabled with config on dev', () => testbed.run(() { test('flutter windows desktop enabled with config on dev', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('dev'); when(mockFlutterVerion.channel).thenReturn('dev');
when<bool>(mockFlutterConfig.getValue('enable-windows-desktop') as bool).thenReturn(true); when<bool>(mockFlutterConfig.getValue('enable-windows-desktop') as bool).thenReturn(true);
expect(featureFlags.isWindowsEnabled, false); expect(featureFlags.isWindowsEnabled, true);
})); }));
test('flutter windows desktop not enabled with environment variable on dev', () => testbed.run(() { test('flutter windows desktop not enabled with environment variable on dev', () => testbed.run(() {
when(mockFlutterVerion.channel).thenReturn('dev'); when(mockFlutterVerion.channel).thenReturn('dev');
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WINDOWS': 'true'}); when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WINDOWS': 'true'});
expect(featureFlags.isWindowsEnabled, false); expect(featureFlags.isWindowsEnabled, true);
})); }));
test('flutter windows desktop off by default on beta', () => testbed.run(() { test('flutter windows desktop off by default on beta', () => testbed.run(() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment