[flutter_tools] add the feature for single widget reloads (#61411)
Implements the flutter config feature for #61407 , but does not implement any of the functionality.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
import 'package:flutter_tools/src/base/file_system.dart';
|
||||
import 'package:flutter_tools/src/base/io.dart';
|
||||
import 'package:flutter_tools/src/features.dart';
|
||||
import 'package:flutter_tools/src/globals.dart' as globals;
|
||||
import 'package:process/process.dart';
|
||||
|
||||
@@ -55,6 +56,20 @@ void main() {
|
||||
expect(result.stdout, contains('Running shutdown hooks'));
|
||||
});
|
||||
|
||||
test('flutter config contains all features', () async {
|
||||
final String flutterBin = globals.fs.path.join(getFlutterRoot(), 'bin', 'flutter');
|
||||
final ProcessResult result = await const LocalProcessManager().run(<String>[
|
||||
flutterBin,
|
||||
'config',
|
||||
]);
|
||||
|
||||
// contains all of the experiments in features.dart
|
||||
expect(result.stdout.split('\n'), containsAll(<Matcher>[
|
||||
for (final Feature feature in allFeatures)
|
||||
contains(feature.configSetting),
|
||||
]));
|
||||
});
|
||||
|
||||
test('flutter run --machine uses AppRunLogger', () async {
|
||||
final Directory directory = createResolvedTempDirectorySync('flutter_run_test.')
|
||||
.createTempSync('_flutter_run_test.')
|
||||
|
||||
@@ -724,6 +724,7 @@ class TestFeatureFlags implements FeatureFlags {
|
||||
this.isMacOSEnabled = false,
|
||||
this.isWebEnabled = false,
|
||||
this.isWindowsEnabled = false,
|
||||
this.isSingleWidgetReloadEnabled = false,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -738,6 +739,9 @@ class TestFeatureFlags implements FeatureFlags {
|
||||
@override
|
||||
final bool isWindowsEnabled;
|
||||
|
||||
@override
|
||||
final bool isSingleWidgetReloadEnabled;
|
||||
|
||||
@override
|
||||
bool isEnabled(Feature feature) {
|
||||
switch (feature) {
|
||||
|
||||
Reference in New Issue
Block a user