[flutter_driver] use mostly public screenshot API. (#157888)

Instead of completely private. This has been broken for Impeller for years, which shows how much this method is getting used.

Fixes https://github.com/flutter/flutter/issues/130461
This commit is contained in:
Jonah Williams
2024-10-31 14:31:07 -07:00
committed by GitHub
parent 19d8fbc6f4
commit 1050959d19
16 changed files with 278 additions and 12 deletions

View File

@@ -0,0 +1,12 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/integration_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.linux;
await task(createSolidColorTest(enableImpeller: true));
}

View File

@@ -0,0 +1,12 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/integration_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.macos;
await task(createSolidColorTest(enableImpeller: true));
}

View File

@@ -0,0 +1,12 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/integration_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.windows;
await task(createSolidColorTest(enableImpeller: true));
}

View File

@@ -131,6 +131,17 @@ TaskFunction createEndToEndKeyboardTextfieldTest() {
).call;
}
TaskFunction createSolidColorTest({required bool enableImpeller}) {
return DriverTest(
'${flutterDirectory.path}/dev/integration_tests/ui',
'lib/solid_color.dart',
extraOptions: <String>[
if (enableImpeller)
'--enable-impeller'
]
).call;
}
TaskFunction dartDefinesTask() {
return DriverTest(
'${flutterDirectory.path}/dev/integration_tests/ui',