[flutter_tools] switch linux desktop feature on (#60018)

Enable linux desktop feature on dev channel
This commit is contained in:
Jonah Williams
2020-06-22 17:04:01 -07:00
committed by GitHub
parent e676024d37
commit 8e9b78728f
2 changed files with 9 additions and 5 deletions

View File

@@ -114,6 +114,10 @@ const Feature flutterLinuxDesktopFeature = Feature(
available: true,
enabledByDefault: false,
),
dev: FeatureChannelSetting(
available: true,
enabledByDefault: false,
),
);
/// The [Feature] for Windows desktop.

View File

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