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
4e4b9bd0
Unverified
Commit
4e4b9bd0
authored
Jul 19, 2019
by
adazh
Committed by
GitHub
Jul 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed the Driver API waitUntilFrameSync to waitUntilNoPendingFrame. (#36512)
parent
43064491
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
find.dart
packages/flutter_driver/lib/src/common/find.dart
+4
-4
extension.dart
packages/flutter_driver/lib/src/extension/extension.dart
+4
-4
extension_test.dart
packages/flutter_driver/test/src/extension_test.dart
+3
-3
No files found.
packages/flutter_driver/lib/src/common/find.dart
View file @
4e4b9bd0
...
...
@@ -120,16 +120,16 @@ class WaitUntilNoTransientCallbacks extends Command {
}
/// A Flutter Driver command that waits until the frame is synced.
class
WaitUntil
FrameSync
extends
Command
{
class
WaitUntil
NoPendingFrame
extends
Command
{
/// Creates a command that waits until there's no pending frame scheduled.
const
WaitUntil
FrameSync
({
Duration
timeout
})
:
super
(
timeout:
timeout
);
const
WaitUntil
NoPendingFrame
({
Duration
timeout
})
:
super
(
timeout:
timeout
);
/// Deserializes this command from the value generated by [serialize].
WaitUntil
FrameSync
.
deserialize
(
Map
<
String
,
String
>
json
)
WaitUntil
NoPendingFrame
.
deserialize
(
Map
<
String
,
String
>
json
)
:
super
.
deserialize
(
json
);
@override
String
get
kind
=>
'waitUntil
FrameSync
'
;
String
get
kind
=>
'waitUntil
NoPendingFrame
'
;
}
/// Base class for Flutter Driver finders, objects that describe how the driver
...
...
packages/flutter_driver/lib/src/extension/extension.dart
View file @
4e4b9bd0
...
...
@@ -113,7 +113,7 @@ class FlutterDriverExtension {
'waitFor'
:
_waitFor
,
'waitForAbsent'
:
_waitForAbsent
,
'waitUntilNoTransientCallbacks'
:
_waitUntilNoTransientCallbacks
,
'waitUntil
FrameSync'
:
_waitUntilFrameSync
,
'waitUntil
NoPendingFrame'
:
_waitUntilNoPendingFrame
,
'get_semantics_id'
:
_getSemanticsId
,
'get_offset'
:
_getOffset
,
'get_diagnostics_tree'
:
_getDiagnosticsTree
,
...
...
@@ -134,7 +134,7 @@ class FlutterDriverExtension {
'waitFor'
:
(
Map
<
String
,
String
>
params
)
=>
WaitFor
.
deserialize
(
params
),
'waitForAbsent'
:
(
Map
<
String
,
String
>
params
)
=>
WaitForAbsent
.
deserialize
(
params
),
'waitUntilNoTransientCallbacks'
:
(
Map
<
String
,
String
>
params
)
=>
WaitUntilNoTransientCallbacks
.
deserialize
(
params
),
'waitUntil
FrameSync'
:
(
Map
<
String
,
String
>
params
)
=>
WaitUntilFrameSync
.
deserialize
(
params
),
'waitUntil
NoPendingFrame'
:
(
Map
<
String
,
String
>
params
)
=>
WaitUntilNoPendingFrame
.
deserialize
(
params
),
'get_semantics_id'
:
(
Map
<
String
,
String
>
params
)
=>
GetSemanticsId
.
deserialize
(
params
),
'get_offset'
:
(
Map
<
String
,
String
>
params
)
=>
GetOffset
.
deserialize
(
params
),
'get_diagnostics_tree'
:
(
Map
<
String
,
String
>
params
)
=>
GetDiagnosticsTree
.
deserialize
(
params
),
...
...
@@ -371,7 +371,7 @@ class FlutterDriverExtension {
return
null
;
}
/// Returns a future that waits until
frame is synced
.
/// Returns a future that waits until
no pending frame is scheduled (frame is synced)
.
///
/// Specifically, it checks:
/// * Whether the count of transient callbacks is zero.
...
...
@@ -388,7 +388,7 @@ class FlutterDriverExtension {
/// `set_frame_sync` method. See [FlutterDriver.runUnsynchronized] for more
/// details on how to do this. Note, disabling frame sync will require the
/// test author to use some other method to avoid flakiness.
Future
<
Result
>
_waitUntil
FrameSync
(
Command
command
)
async
{
Future
<
Result
>
_waitUntil
NoPendingFrame
(
Command
command
)
async
{
await
_waitUntilFrame
(()
{
return
SchedulerBinding
.
instance
.
transientCallbackCount
==
0
&&
!
SchedulerBinding
.
instance
.
hasScheduledFrame
;
...
...
packages/flutter_driver/test/src/extension_test.dart
View file @
4e4b9bd0
...
...
@@ -345,7 +345,7 @@ void main() {
testWidgets
(
'returns immediately when frame is synced'
,
(
WidgetTester
tester
)
async
{
extension
.
call
(
const
WaitUntil
FrameSync
().
serialize
())
extension
.
call
(
const
WaitUntil
NoPendingFrame
().
serialize
())
.
then
<
void
>(
expectAsync1
((
Map
<
String
,
dynamic
>
r
)
{
result
=
r
;
}));
...
...
@@ -366,7 +366,7 @@ void main() {
// Intentionally blank. We only care about existence of a callback.
});
extension
.
call
(
const
WaitUntil
FrameSync
().
serialize
())
extension
.
call
(
const
WaitUntil
NoPendingFrame
().
serialize
())
.
then
<
void
>(
expectAsync1
((
Map
<
String
,
dynamic
>
r
)
{
result
=
r
;
}));
...
...
@@ -390,7 +390,7 @@ void main() {
'waits until no pending scheduled frame'
,
(
WidgetTester
tester
)
async
{
SchedulerBinding
.
instance
.
scheduleFrame
();
extension
.
call
(
const
WaitUntil
FrameSync
().
serialize
())
extension
.
call
(
const
WaitUntil
NoPendingFrame
().
serialize
())
.
then
<
void
>(
expectAsync1
((
Map
<
String
,
dynamic
>
r
)
{
result
=
r
;
}));
...
...
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