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
e52ebb3a
Unverified
Commit
e52ebb3a
authored
Mar 13, 2021
by
Jonah Williams
Committed by
GitHub
Mar 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[integration_test] delay for at least one frame timing. (#78055)
parent
a5d0d0e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
integration_test.dart
packages/integration_test/lib/integration_test.dart
+12
-3
No files found.
packages/integration_test/lib/integration_test.dart
View file @
e52ebb3a
...
...
@@ -305,10 +305,19 @@ class IntegrationTestWidgetsFlutterBinding extends LiveTestWidgetsFlutterBinding
// TODO(CareF): remove this when flush FrameTiming is readly in engine.
// See https://github.com/flutter/flutter/issues/64808
// and https://github.com/flutter/flutter/issues/67593
Future
<
void
>
delayForFrameTimings
()
=>
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
2
));
await
delayForFrameTimings
();
// flush old FrameTimings
final
List
<
FrameTiming
>
frameTimings
=
<
FrameTiming
>[];
Future
<
void
>
delayForFrameTimings
()
async
{
int
count
=
0
;
while
(
frameTimings
.
isEmpty
)
{
count
++;
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
2
));
if
(
count
>
20
)
{
print
(
'delayForFrameTimings is taking longer than expected...'
);
}
}
}
await
Future
<
void
>.
delayed
(
const
Duration
(
seconds:
2
));
// flush old FrameTimings
final
TimingsCallback
watcher
=
frameTimings
.
addAll
;
addTimingsCallback
(
watcher
);
await
action
();
...
...
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