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
90aa2957
Commit
90aa2957
authored
Mar 17, 2017
by
Alexandre Ardhuin
Committed by
GitHub
Mar 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace const Duration() with Duration.ZERO (#8835)
parent
6cd552fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
service_extensions_test.dart
...ages/flutter/test/foundation/service_extensions_test.dart
+2
-2
platform_channel_test.dart
packages/flutter/test/services/platform_channel_test.dart
+2
-2
async_test.dart
packages/flutter/test/widgets/async_test.dart
+1
-1
No files found.
packages/flutter/test/foundation/service_extensions_test.dart
View file @
90aa2957
...
...
@@ -53,12 +53,12 @@ class TestServiceExtensionsBinding extends BindingBase
void
doFrame
()
{
frameScheduled
=
false
;
if
(
ui
.
window
.
onBeginFrame
!=
null
)
ui
.
window
.
onBeginFrame
(
const
Duration
()
);
ui
.
window
.
onBeginFrame
(
Duration
.
ZERO
);
}
Future
<
Null
>
flushMicrotasks
()
{
final
Completer
<
Null
>
completer
=
new
Completer
<
Null
>();
new
Timer
(
const
Duration
(),
completer
.
complete
);
Timer
.
run
(
completer
.
complete
);
return
completer
.
future
;
}
}
...
...
packages/flutter/test/services/platform_channel_test.dart
View file @
90aa2957
...
...
@@ -101,8 +101,8 @@ void main() {
);
final
List
<
dynamic
>
events
=
await
channel
.
receiveBroadcastStream
(
'hello'
).
toList
();
expect
(
events
,
orderedEquals
(<
String
>[
'hello1'
,
'hello2'
]));
await
new
Future
<
Null
>.
delayed
(
const
Duration
()
);
await
new
Future
<
Null
>.
delayed
(
Duration
.
ZERO
);
expect
(
cancelled
,
isTrue
);
});
});
}
\ No newline at end of file
}
packages/flutter/test/widgets/async_test.dart
View file @
90aa2957
...
...
@@ -255,7 +255,7 @@ void main() {
}
Future
<
Null
>
eventFiring
(
WidgetTester
tester
)
async
{
await
tester
.
pump
(
const
Duration
()
);
await
tester
.
pump
(
Duration
.
ZERO
);
}
class
StringCollector
extends
StreamBuilderBase
<
String
,
List
<
String
>>
{
...
...
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