Unverified Commit 70f60b17 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Run dev/bots/test's flutter drive test in preview-dart-2 (#15090)

* Run dev/bots/test's flutter drive test in preview-dart-2

* Fix extension callback type

* More type fixes
parent c8850159
...@@ -177,7 +177,10 @@ Future<Null> _runTests({List<String> options: const <String>[]}) async { ...@@ -177,7 +177,10 @@ Future<Null> _runTests({List<String> options: const <String>[]}) async {
expectFailure: true, expectFailure: true,
printOutput: false, printOutput: false,
); );
await _runCommand(flutter, <String>['drive', '--use-existing-app', '-t', path.join('test_driver', 'failure.dart')], await _runCommand(flutter,
<String>['drive', '--use-existing-app']
..addAll(options)
..addAll(<String>[ '-t', path.join('test_driver', 'failure.dart')]),
workingDirectory: path.join(flutterRoot, 'packages', 'flutter_driver'), workingDirectory: path.join(flutterRoot, 'packages', 'flutter_driver'),
expectFailure: true, expectFailure: true,
printOutput: false, printOutput: false,
......
...@@ -34,7 +34,7 @@ class TestServiceExtensionsBinding extends BindingBase ...@@ -34,7 +34,7 @@ class TestServiceExtensionsBinding extends BindingBase
extensions[name] = callback; extensions[name] = callback;
} }
Future<Map<String, String>> testExtension(String name, Map<String, String> arguments) { Future<Map<String, dynamic>> testExtension(String name, Map<String, String> arguments) {
expect(extensions.containsKey(name), isTrue); expect(extensions.containsKey(name), isTrue);
return extensions[name](arguments); return extensions[name](arguments);
} }
...@@ -82,7 +82,7 @@ class TestServiceExtensionsBinding extends BindingBase ...@@ -82,7 +82,7 @@ class TestServiceExtensionsBinding extends BindingBase
TestServiceExtensionsBinding binding; TestServiceExtensionsBinding binding;
Future<Map<String, String>> hasReassemble(Future<Map<String, String>> pendingResult) async { Future<Map<String, dynamic>> hasReassemble(Future<Map<String, dynamic>> pendingResult) async {
bool completed = false; bool completed = false;
pendingResult.whenComplete(() { completed = true; }); pendingResult.whenComplete(() { completed = true; });
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
...@@ -118,7 +118,7 @@ void main() { ...@@ -118,7 +118,7 @@ void main() {
// must be first and last respectively. // must be first and last respectively.
test('Service extensions - debugAllowBanner', () async { test('Service extensions - debugAllowBanner', () async {
Map<String, String> result; Map<String, dynamic> result;
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
expect(WidgetsApp.debugAllowBannerOverride, true); expect(WidgetsApp.debugAllowBannerOverride, true);
...@@ -141,7 +141,7 @@ void main() { ...@@ -141,7 +141,7 @@ void main() {
}); });
test('Service extensions - debugDumpApp', () async { test('Service extensions - debugDumpApp', () async {
Map<String, String> result; Map<String, dynamic> result;
result = await binding.testExtension('debugDumpApp', <String, String>{}); result = await binding.testExtension('debugDumpApp', <String, String>{});
expect(result, <String, String>{}); expect(result, <String, String>{});
...@@ -150,7 +150,7 @@ void main() { ...@@ -150,7 +150,7 @@ void main() {
}); });
test('Service extensions - debugDumpRenderTree', () async { test('Service extensions - debugDumpRenderTree', () async {
Map<String, String> result; Map<String, dynamic> result;
await binding.doFrame(); await binding.doFrame();
result = await binding.testExtension('debugDumpRenderTree', <String, String>{}); result = await binding.testExtension('debugDumpRenderTree', <String, String>{});
...@@ -170,7 +170,7 @@ void main() { ...@@ -170,7 +170,7 @@ void main() {
}); });
test('Service extensions - debugDumpLayerTree', () async { test('Service extensions - debugDumpLayerTree', () async {
Map<String, String> result; Map<String, dynamic> result;
await binding.doFrame(); await binding.doFrame();
result = await binding.testExtension('debugDumpLayerTree', <String, String>{}); result = await binding.testExtension('debugDumpLayerTree', <String, String>{});
...@@ -194,7 +194,7 @@ void main() { ...@@ -194,7 +194,7 @@ void main() {
}); });
test('Service extensions - debugDumpSemanticsTreeInGeometricOrder', () async { test('Service extensions - debugDumpSemanticsTreeInGeometricOrder', () async {
Map<String, String> result; Map<String, dynamic> result;
await binding.doFrame(); await binding.doFrame();
result = await binding.testExtension('debugDumpSemanticsTreeInGeometricOrder', <String, String>{}); result = await binding.testExtension('debugDumpSemanticsTreeInGeometricOrder', <String, String>{});
...@@ -204,7 +204,7 @@ void main() { ...@@ -204,7 +204,7 @@ void main() {
}); });
test('Service extensions - debugDumpSemanticsTreeInInverseHitTestOrder', () async { test('Service extensions - debugDumpSemanticsTreeInInverseHitTestOrder', () async {
Map<String, String> result; Map<String, dynamic> result;
await binding.doFrame(); await binding.doFrame();
result = await binding.testExtension('debugDumpSemanticsTreeInInverseHitTestOrder', <String, String>{}); result = await binding.testExtension('debugDumpSemanticsTreeInInverseHitTestOrder', <String, String>{});
...@@ -214,8 +214,8 @@ void main() { ...@@ -214,8 +214,8 @@ void main() {
}); });
test('Service extensions - debugPaint', () async { test('Service extensions - debugPaint', () async {
Map<String, String> result; Map<String, dynamic> result;
Future<Map<String, String>> pendingResult; Future<Map<String, dynamic>> pendingResult;
bool completed; bool completed;
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
...@@ -256,8 +256,8 @@ void main() { ...@@ -256,8 +256,8 @@ void main() {
}); });
test('Service extensions - debugPaintBaselinesEnabled', () async { test('Service extensions - debugPaintBaselinesEnabled', () async {
Map<String, String> result; Map<String, dynamic> result;
Future<Map<String, String>> pendingResult; Future<Map<String, dynamic>> pendingResult;
bool completed; bool completed;
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
...@@ -298,7 +298,7 @@ void main() { ...@@ -298,7 +298,7 @@ void main() {
}); });
test('Service extensions - evict', () async { test('Service extensions - evict', () async {
Map<String, String> result; Map<String, dynamic> result;
bool completed; bool completed;
completed = false; completed = false;
...@@ -330,14 +330,14 @@ void main() { ...@@ -330,14 +330,14 @@ void main() {
}); });
test('Service extensions - frameworkPresent', () async { test('Service extensions - frameworkPresent', () async {
Map<String, String> result; Map<String, dynamic> result;
result = await binding.testExtension('frameworkPresent', <String, String>{}); result = await binding.testExtension('frameworkPresent', <String, String>{});
expect(result, <String, String>{}); expect(result, <String, String>{});
}); });
test('Service extensions - platformOverride', () async { test('Service extensions - platformOverride', () async {
Map<String, String> result; Map<String, dynamic> result;
expect(binding.reassembled, 0); expect(binding.reassembled, 0);
expect(defaultTargetPlatform, TargetPlatform.android); expect(defaultTargetPlatform, TargetPlatform.android);
...@@ -372,8 +372,8 @@ void main() { ...@@ -372,8 +372,8 @@ void main() {
}); });
test('Service extensions - repaintRainbow', () async { test('Service extensions - repaintRainbow', () async {
Map<String, String> result; Map<String, dynamic> result;
Future<Map<String, String>> pendingResult; Future<Map<String, dynamic>> pendingResult;
bool completed; bool completed;
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
...@@ -415,8 +415,8 @@ void main() { ...@@ -415,8 +415,8 @@ void main() {
}); });
test('Service extensions - reassemble', () async { test('Service extensions - reassemble', () async {
Map<String, String> result; Map<String, dynamic> result;
Future<Map<String, String>> pendingResult; Future<Map<String, dynamic>> pendingResult;
bool completed; bool completed;
completed = false; completed = false;
...@@ -437,7 +437,7 @@ void main() { ...@@ -437,7 +437,7 @@ void main() {
}); });
test('Service extensions - showPerformanceOverlay', () async { test('Service extensions - showPerformanceOverlay', () async {
Map<String, String> result; Map<String, dynamic> result;
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
expect(WidgetsApp.showPerformanceOverlayOverride, false); expect(WidgetsApp.showPerformanceOverlayOverride, false);
...@@ -460,7 +460,7 @@ void main() { ...@@ -460,7 +460,7 @@ void main() {
}); });
test('Service extensions - debugWidgetInspector', () async { test('Service extensions - debugWidgetInspector', () async {
Map<String, String> result; Map<String, dynamic> result;
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
expect(WidgetsApp.debugShowWidgetInspectorOverride, false); expect(WidgetsApp.debugShowWidgetInspectorOverride, false);
...@@ -483,7 +483,7 @@ void main() { ...@@ -483,7 +483,7 @@ void main() {
}); });
test('Service extensions - timeDilation', () async { test('Service extensions - timeDilation', () async {
Map<String, String> result; Map<String, dynamic> result;
expect(binding.frameScheduled, isFalse); expect(binding.frameScheduled, isFalse);
expect(timeDilation, 1.0); expect(timeDilation, 1.0);
......
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