Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1957c663
Unverified
Commit
1957c663
authored
Jul 18, 2019
by
Jonah Williams
Committed by
GitHub
Jul 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add testing to screenshot and printDetails method (#36418)
parent
b7a49c4a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
330 additions
and
218 deletions
+330
-218
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+7
-0
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+323
-218
No files found.
packages/flutter_tools/lib/src/resident_runner.dart
View file @
1957c663
...
@@ -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
{
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
1957c663
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment