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
5a9063f5
Commit
5a9063f5
authored
Jan 11, 2017
by
Michael Goderbauer
Committed by
GitHub
Jan 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove waitForElement-specific timeout. (#7442)
It is now handled at a higher level for all commands.
parent
6d84e4aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
extension.dart
packages/flutter_driver/lib/src/extension.dart
+1
-10
No files found.
packages/flutter_driver/lib/src/extension.dart
View file @
5a9063f5
...
...
@@ -21,7 +21,6 @@ import 'render_tree.dart';
const
String
_extensionMethodName
=
'driver'
;
const
String
_extensionMethod
=
'ext.flutter.
$_extensionMethodName
'
;
const
Duration
_kDefaultTimeout
=
const
Duration
(
seconds:
5
);
class
_DriverBinding
extends
WidgetsFlutterBinding
{
// TODO(ianh): refactor so we're not extending a concrete binding
@override
...
...
@@ -156,9 +155,7 @@ class _FlutterDriverExtension {
return
new
RenderTree
(
RendererBinding
.
instance
?.
renderView
?.
toStringDeep
());
}
/// Runs `finder` repeatedly until it finds one or more [Element]s, or times out.
///
/// The timeout is five seconds.
/// Runs `finder` repeatedly until it finds one or more [Element]s.
Future
<
Finder
>
_waitForElement
(
Finder
finder
)
{
// Short-circuit if the element is already on the UI
if
(
finder
.
precache
())
...
...
@@ -168,15 +165,9 @@ class _FlutterDriverExtension {
Completer
<
Finder
>
completer
=
new
Completer
<
Finder
>();
StreamSubscription
<
Duration
>
subscription
;
Timer
timeout
=
new
Timer
(
_kDefaultTimeout
,
()
{
subscription
.
cancel
();
completer
.
completeError
(
'Timed out waiting for
${finder.description}
'
);
});
subscription
=
_onFrameReady
.
listen
((
Duration
duration
)
{
if
(
finder
.
precache
())
{
subscription
.
cancel
();
timeout
.
cancel
();
completer
.
complete
(
finder
);
}
});
...
...
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