Enable avoid_redundant_argument_values lint (#91409)
This commit is contained in:
@@ -367,7 +367,7 @@ mixin CommandHandlerFactory {
|
||||
final Duration pause = scrollCommand.duration ~/ totalMoves;
|
||||
final Offset startLocation = _prober.getCenter(target);
|
||||
Offset currentLocation = startLocation;
|
||||
final TestPointer pointer = TestPointer(1);
|
||||
final TestPointer pointer = TestPointer();
|
||||
_prober.binding.handlePointerEvent(pointer.down(startLocation));
|
||||
await Future<void>.value(); // so that down and move don't happen in the same microtask
|
||||
for (int moves = 0; moves < totalMoves; moves += 1) {
|
||||
|
||||
@@ -556,7 +556,6 @@ Future<vms.VmService> _waitAndConnect(String url, Map<String, dynamic>? headers)
|
||||
final vms.VmService service = vms.VmService(
|
||||
controller.stream,
|
||||
socket.add,
|
||||
log: null,
|
||||
disposeHandler: () => socket!.close(),
|
||||
streamClosed: streamClosedCompleter.future
|
||||
);
|
||||
|
||||
@@ -848,7 +848,7 @@ void main() {
|
||||
);
|
||||
|
||||
// Widget
|
||||
Map<String, dynamic> result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'), depth: 0);
|
||||
Map<String, dynamic> result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'));
|
||||
expect(result['children'], isNull); // depth: 0
|
||||
expect(result['widgetRuntimeType'], 'Text');
|
||||
|
||||
@@ -857,7 +857,7 @@ void main() {
|
||||
expect(stringProperty['description'], '"Hello World"');
|
||||
expect(stringProperty['propertyType'], 'String');
|
||||
|
||||
result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'), depth: 0, properties: false);
|
||||
result = await getDiagnosticsTree(DiagnosticsType.widget, ByValueKey('Text'), properties: false);
|
||||
expect(result['widgetRuntimeType'], 'Text');
|
||||
expect(result['properties'], isNull); // properties: false
|
||||
|
||||
@@ -870,12 +870,12 @@ void main() {
|
||||
expect(children.single['children'], isEmpty);
|
||||
|
||||
// RenderObject
|
||||
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'), depth: 0);
|
||||
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'));
|
||||
expect(result['children'], isNull); // depth: 0
|
||||
expect(result['properties'], isNotNull);
|
||||
expect(result['description'], startsWith('RenderParagraph'));
|
||||
|
||||
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'), depth: 0, properties: false);
|
||||
result = await getDiagnosticsTree(DiagnosticsType.renderObject, ByValueKey('Text'), properties: false);
|
||||
expect(result['properties'], isNull); // properties: false
|
||||
expect(result['description'], startsWith('RenderParagraph'));
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('logFilePathName was set when a new driver was created', () {
|
||||
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate, logCommunicationToFile: true);
|
||||
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate);
|
||||
logFile = File(driver.logFilePathName);
|
||||
expect(logFile.path, endsWith('.log'));
|
||||
});
|
||||
@@ -113,7 +113,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('printCommunication = false', () async {
|
||||
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate, printCommunication: false);
|
||||
driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate);
|
||||
await driver.waitFor(find.byTooltip('foo'), timeout: _kTestTimeout);
|
||||
expect(log, <String>[]);
|
||||
});
|
||||
@@ -783,7 +783,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('printCommunication = false', () async {
|
||||
driver = WebFlutterDriver.connectedTo(fakeConnection, printCommunication: false);
|
||||
driver = WebFlutterDriver.connectedTo(fakeConnection);
|
||||
await driver.waitFor(find.byTooltip('printCommunication test'), timeout: _kTestTimeout);
|
||||
expect(log, <String>[]);
|
||||
});
|
||||
|
||||
@@ -502,7 +502,6 @@ void main() {
|
||||
]).writeTimelineToFile(
|
||||
'test',
|
||||
destinationDirectory: tempDir.path,
|
||||
includeSummary: true,
|
||||
);
|
||||
final String written =
|
||||
await fs.file(path.join(tempDir.path, 'test.timeline.json')).readAsString();
|
||||
|
||||
Reference in New Issue
Block a user