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
99e916d0
Commit
99e916d0
authored
Apr 08, 2016
by
Yegor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[driver] fix analyzer warnings in the extension (#3205)
parent
63358728
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
extension.dart
packages/flutter_driver/lib/src/extension.dart
+7
-7
all.dart
packages/flutter_driver/test/all.dart
+4
-0
No files found.
packages/flutter_driver/lib/src/extension.dart
View file @
99e916d0
...
...
@@ -42,7 +42,7 @@ void enableFlutterDriverExtension() {
}
/// Handles a command and returns a result.
typedef
Future
<
R
>
CommandHandlerCallback
<
R
extends
Result
>
(
Command
c
);
typedef
Future
<
R
esult
>
CommandHandlerCallback
(
Command
c
);
/// Deserializes JSON map to a command object.
typedef
Command
CommandDeserializerCallback
(
Map
<
String
,
String
>
params
);
...
...
@@ -93,7 +93,7 @@ class FlutterDriverExtension {
Command
command
=
commandDeserializer
(
params
);
return
commandHandler
(
command
).
then
((
Result
result
)
{
return
new
ServiceExtensionResponse
.
result
(
JSON
.
encode
(
result
.
toJson
()));
},
onError:
(
e
,
s
)
{
},
onError:
(
Object
e
,
Object
s
)
{
_log
.
warning
(
'
$e
:
\n
$s
'
);
return
new
ServiceExtensionResponse
.
error
(
ServiceExtensionResponse
.
extensionError
,
'
$e
'
);
});
...
...
@@ -122,9 +122,9 @@ class FlutterDriverExtension {
/// [descriptionGetter] describes the object to be waited for. It is used in
/// the warning printed should timeout happen.
Future
<
ObjectRef
>
_waitForObject
(
String
descriptionGetter
(),
Object
locator
())
async
{
Object
object
=
await
retry
(
locator
,
_kDefaultTimeout
,
_kDefaultPauseBetweenRetries
,
predicate:
(
object
)
{
Object
object
=
await
retry
(
locator
,
_kDefaultTimeout
,
_kDefaultPauseBetweenRetries
,
predicate:
(
Object
object
)
{
return
object
!=
null
;
}).
catchError
((
dynamic
error
,
stackTrace
)
{
}).
catchError
((
Object
error
,
Object
stackTrace
)
{
_log
.
warning
(
'Timed out waiting for
${descriptionGetter()}
'
);
return
null
;
});
...
...
@@ -132,7 +132,7 @@ class FlutterDriverExtension {
ObjectRef
elemRef
=
object
!=
null
?
new
ObjectRef
(
_registerObject
(
object
))
:
new
ObjectRef
.
notFound
();
return
new
Future
.
value
(
elemRef
);
return
new
Future
<
ObjectRef
>
.
value
(
elemRef
);
}
Future
<
ObjectRef
>
findByValueKey
(
ByValueKey
byKey
)
async
{
...
...
@@ -220,8 +220,8 @@ class FlutterDriverExtension {
Element
object
=
_dereference
(
reference
);
if
(
object
==
null
)
return
new
Future
.
error
(
'Object reference not found (
$reference
).'
);
return
new
Future
<
String
>
.
error
(
'Object reference not found (
$reference
).'
);
return
new
Future
.
value
(
object
);
return
new
Future
<
Element
>
.
value
(
object
);
}
}
packages/flutter_driver/test/all.dart
View file @
99e916d0
...
...
@@ -4,8 +4,12 @@
import
'flutter_driver_test.dart'
as
flutter_driver_test
;
import
'src/retry_test.dart'
as
retry_test
;
import
'src/timeline_test.dart'
as
timeline_test
;
import
'src/timeline_summary_test.dart'
as
timeline_summary_test
;
void
main
(
)
{
flutter_driver_test
.
main
();
retry_test
.
main
();
timeline_summary_test
.
main
();
timeline_test
.
main
();
}
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