Unverified Commit 1957c663 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

add testing to screenshot and printDetails method (#36418)

parent b7a49c4a
...@@ -679,7 +679,14 @@ abstract class ResidentRunner { ...@@ -679,7 +679,14 @@ abstract class ResidentRunner {
} }
} }
/// Take a screenshot on the provided [device].
///
/// If the device has a connected vmservice, this method will attempt to hide
/// and restore the debug banner before taking the screenshot.
///
/// Throws an [AssertionError] if [Devce.supportsScreenshot] is not true.
Future<void> screenshot(FlutterDevice device) async { Future<void> screenshot(FlutterDevice device) async {
assert(device.device.supportsScreenshot);
final Status status = logger.startProgress('Taking screenshot for ${device.device.name}...', timeout: timeoutConfiguration.fastOperation); final Status status = logger.startProgress('Taking screenshot for ${device.device.name}...', timeout: timeoutConfiguration.fastOperation);
final File outputFile = getUniqueFile(fs.currentDirectory, 'flutter', 'png'); final File outputFile = getUniqueFile(fs.currentDirectory, 'flutter', 'png');
try { try {
......
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