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
c7ea3ca3
Unverified
Commit
c7ea3ca3
authored
May 29, 2018
by
Mikkel Nygaard Ravn
Committed by
GitHub
May 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert sync async (#18002)
parent
0e8164be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
62 deletions
+2
-62
exception_handling_expectation.txt
...ted_tests/flutter_test/exception_handling_expectation.txt
+1
-4
test_async_utils_guarded_test.dart
...ted_tests/flutter_test/test_async_utils_guarded_test.dart
+1
-4
dart_test.dart
packages/flutter/test/engine/dart_test.dart
+0
-26
binding.dart
packages/flutter_test/lib/src/binding.dart
+0
-26
compile.dart
packages/flutter_tools/lib/src/compile.dart
+0
-2
No files found.
dev/automated_tests/flutter_test/exception_handling_expectation.txt
View file @
c7ea3ca3
...
...
@@ -43,10 +43,7 @@ Who lives, who dies, who tells your story\?
When the exception was thrown, this was the stack:
#[0-9]+ +main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:16:9\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
#[0-9]+ +main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:15:77\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\)
<<skip until matching line>>
^\(elided [0-9]+ .+\)$
...
...
dev/automated_tests/flutter_test/test_async_utils_guarded_test.dart
View file @
c7ea3ca3
...
...
@@ -14,10 +14,7 @@ class TestTestBinding extends AutomatedTestWidgetsFlutterBinding {
Future
<
Null
>
guardedHelper
(
WidgetTester
tester
)
{
return
TestAsyncUtils
.
guard
(()
async
{
await
tester
.
pumpWidget
(
const
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
const
Text
(
'Hello'
),
));
await
tester
.
pumpWidget
(
const
Text
(
'Hello'
));
});
}
...
...
packages/flutter/test/engine/dart_test.dart
deleted
100644 → 0
View file @
0e8164be
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'package:test/test.dart'
;
/// Verifies Dart semantics governed by flags set by Flutter tooling.
void
main
(
)
{
group
(
'Async'
,
()
{
String
greeting
=
'hello'
;
Future
<
void
>
changeGreeting
()
async
{
greeting
+=
' 1'
;
await
new
Future
<
void
>.
value
(
null
);
greeting
+=
' 2'
;
}
test
(
'execution of async method starts synchronously'
,
()
async
{
expect
(
greeting
,
'hello'
);
final
Future
<
void
>
future
=
changeGreeting
();
expect
(
greeting
,
'hello 1'
);
await
future
;
expect
(
greeting
,
'hello 1 2'
);
});
});
}
packages/flutter_test/lib/src/binding.dart
View file @
c7ea3ca3
...
...
@@ -490,12 +490,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
}
Future
<
Null
>
_runTestBody
(
Future
<
Null
>
testBody
(),
VoidCallback
invariantTester
)
async
{
// Delay this function by a microtask.
// Otherwise it will open a scope immediately, which is then open when
// the `asyncBarrier` is invoked. The `asyncBarrier` is immediately
// following the call to `testZone.runBinary(_runTestBody)`, so delaying
// by one microtask is enough to ensure that the timing is correct.
await
new
Future
<
Null
>.
microtask
(()
{});
assert
(
inTest
);
runApp
(
new
Container
(
key:
new
UniqueKey
(),
child:
_preTestMessage
));
// Reset the tree to a known state.
...
...
@@ -773,12 +767,6 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
});
return
new
Future
<
Null
>.
microtask
(()
async
{
// Run all queued microtasks.
await
new
Future
<
Null
>.
microtask
(()
{});
// When the test had an exception, the test-framework already
// ran the teardown functions, removing the _fakeAsync function.
if
(
_fakeAsync
==
null
)
return
null
;
// Resolve interplay between fake async and real async calls.
_fakeAsync
.
flushMicrotasks
();
while
(
_pendingAsyncTasks
!=
null
)
{
...
...
@@ -995,13 +983,6 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
@override
void
handleBeginFrame
(
Duration
rawTimeStamp
)
{
// Don't run this function when `handleBeginFrame` was invoked
// immediately before without a call of `handleDrawFrame` in between.
// TODO(floitsch): Remove this line when the spurious calls from the
// framework don't happen anymore. See
// https://github.com/flutter/flutter/issues/17963
if
(
_doDrawThisFrame
!=
null
)
return
;
assert
(
_doDrawThisFrame
==
null
);
if
(
_expectingFrame
||
(
framePolicy
==
LiveTestWidgetsFlutterBindingFramePolicy
.
fullyLive
)
||
...
...
@@ -1016,13 +997,6 @@ class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
@override
void
handleDrawFrame
()
{
// Don't run this function when `handleBeginFrame` wasn't invoked
// immediately before.
// TODO(floitsch): Remove this line when the spurious calls from the
// framework don't happen anymore. See
// https://github.com/flutter/flutter/issues/17963
if
(
_doDrawThisFrame
==
null
)
return
;
assert
(
_doDrawThisFrame
!=
null
);
if
(
_doDrawThisFrame
)
super
.
handleDrawFrame
();
...
...
packages/flutter_tools/lib/src/compile.dart
View file @
c7ea3ca3
...
...
@@ -120,7 +120,6 @@ class KernelCompiler {
'--sdk-root'
,
sdkRoot
,
'--strong'
,
'--sync-async'
,
'--target=flutter'
,
];
if
(
trackWidgetCreation
)
...
...
@@ -253,7 +252,6 @@ class ResidentCompiler {
_sdkRoot
,
'--incremental'
,
'--strong'
,
'--sync-async'
,
'--target=flutter'
,
];
if
(
outputPath
!=
null
)
{
...
...
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