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
f11c3410
Unverified
Commit
f11c3410
authored
Sep 27, 2019
by
Alexandre Ardhuin
Committed by
GitHub
Sep 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bad indentations(mainly around collection literals) (#41355)
parent
62571b4b
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
255 additions
and
234 deletions
+255
-234
nav_bar_test.dart
packages/flutter/test/cupertino/nav_bar_test.dart
+4
-4
route_test.dart
packages/flutter/test/cupertino/route_test.dart
+2
-2
bottom_navigation_bar_test.dart
...ges/flutter/test/material/bottom_navigation_bar_test.dart
+15
-12
raw_material_button_test.dart
packages/flutter/test/material/raw_material_button_test.dart
+19
-17
platform_view_test.dart
packages/flutter/test/rendering/platform_view_test.dart
+7
-6
table_test.dart
packages/flutter/test/rendering/table_test.dart
+20
-10
message_codecs_test.dart
packages/flutter/test/services/message_codecs_test.dart
+4
-2
draggable_test.dart
packages/flutter/test/widgets/draggable_test.dart
+13
-11
navigator_test.dart
packages/flutter/test/widgets/navigator_test.dart
+7
-7
overscroll_indicator_test.dart
packages/flutter/test/widgets/overscroll_indicator_test.dart
+1
-1
sliver_fill_remaining_test.dart
...ages/flutter/test/widgets/sliver_fill_remaining_test.dart
+5
-5
sliver_semantics_test.dart
packages/flutter/test/widgets/sliver_semantics_test.dart
+1
-1
build_runner.dart
...ages/flutter_tools/lib/src/build_runner/build_runner.dart
+2
-2
build_script.dart
...ages/flutter_tools/lib/src/build_runner/build_script.dart
+17
-18
dart.dart
...ages/flutter_tools/lib/src/build_system/targets/dart.dart
+3
-3
bundle.dart
packages/flutter_tools/lib/src/bundle.dart
+1
-1
unpack.dart
packages/flutter_tools/lib/src/commands/unpack.dart
+1
-2
doctor.dart
packages/flutter_tools/lib/src/doctor.dart
+1
-1
flutter_web_platform.dart
...ages/flutter_tools/lib/src/test/flutter_web_platform.dart
+6
-7
version.dart
packages/flutter_tools/lib/src/version.dart
+8
-8
vmservice.dart
packages/flutter_tools/lib/src/vmservice.dart
+2
-2
android_workflow_test.dart
...ols/test/general.shard/android/android_workflow_test.dart
+2
-2
gradle_test.dart
...flutter_tools/test/general.shard/android/gradle_test.dart
+8
-8
build_test.dart
...ges/flutter_tools/test/general.shard/base/build_test.dart
+33
-29
dart_test.dart
...ls/test/general.shard/build_system/targets/dart_test.dart
+6
-6
build_linux_test.dart
...r_tools/test/general.shard/commands/build_linux_test.dart
+1
-1
build_macos_test.dart
...r_tools/test/general.shard/commands/build_macos_test.dart
+1
-1
build_windows_test.dart
...tools/test/general.shard/commands/build_windows_test.dart
+1
-1
precache_test.dart
...tter_tools/test/general.shard/commands/precache_test.dart
+11
-11
flutter_manifest_test.dart
...utter_tools/test/general.shard/flutter_manifest_test.dart
+2
-2
simulators_test.dart
...flutter_tools/test/general.shard/ios/simulators_test.dart
+6
-6
xcode_backend_test.dart
...tter_tools/test/general.shard/ios/xcode_backend_test.dart
+1
-2
cocoapods_test.dart
...lutter_tools/test/general.shard/macos/cocoapods_test.dart
+3
-3
project_test.dart
packages/flutter_tools/test/general.shard/project_test.dart
+3
-3
resident_web_runner_cold_test.dart
...ols/test/general.shard/resident_web_runner_cold_test.dart
+12
-11
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+12
-11
flutter_tester_test.dart
..._tools/test/general.shard/tester/flutter_tester_test.dart
+1
-2
visual_studio_test.dart
..._tools/test/general.shard/windows/visual_studio_test.dart
+8
-8
test_driver.dart
...ges/flutter_tools/test/integration.shard/test_driver.dart
+5
-5
No files found.
packages/flutter/test/cupertino/nav_bar_test.dart
View file @
f11c3410
...
@@ -334,8 +334,8 @@ void main() {
...
@@ -334,8 +334,8 @@ void main() {
});
});
expect
(
opacities
,
<
double
>
[
expect
(
opacities
,
<
double
>
[
0.0
,
// Initially the smaller font title is invisible.
0.0
,
// Initially the smaller font title is invisible.
1.0
,
// The larger font title is visible.
1.0
,
// The larger font title is visible.
]);
]);
expect
(
tester
.
getTopLeft
(
find
.
widgetWithText
(
OverflowBox
,
'Title'
)).
dy
,
44.0
);
expect
(
tester
.
getTopLeft
(
find
.
widgetWithText
(
OverflowBox
,
'Title'
)).
dy
,
44.0
);
...
@@ -359,8 +359,8 @@ void main() {
...
@@ -359,8 +359,8 @@ void main() {
});
});
expect
(
opacities
,
<
double
>
[
expect
(
opacities
,
<
double
>
[
1.0
,
// Smaller font title now visible
1.0
,
// Smaller font title now visible
0.0
,
// Larger font title invisible.
0.0
,
// Larger font title invisible.
]);
]);
// The persistent toolbar doesn't move or change size.
// The persistent toolbar doesn't move or change size.
...
...
packages/flutter/test/cupertino/route_test.dart
View file @
f11c3410
...
@@ -95,8 +95,8 @@ void main() {
...
@@ -95,8 +95,8 @@ void main() {
});
});
expect
(
opacities
,
<
double
>
[
expect
(
opacities
,
<
double
>
[
0.0
,
// Initially the smaller font title is invisible.
0.0
,
// Initially the smaller font title is invisible.
1.0
,
// The larger font title is visible.
1.0
,
// The larger font title is visible.
]);
]);
// Check that the large font title is at the right spot.
// Check that the large font title is at the right spot.
...
...
packages/flutter/test/material/bottom_navigation_bar_test.dart
View file @
f11c3410
...
@@ -1431,18 +1431,21 @@ void main() {
...
@@ -1431,18 +1431,21 @@ void main() {
testWidgets
(
'BottomNavigationBar item title should not be nullable'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'BottomNavigationBar item title should not be nullable'
,
(
WidgetTester
tester
)
async
{
expect
(()
{
expect
(()
{
MaterialApp
(
MaterialApp
(
home:
Scaffold
(
home:
Scaffold
(
bottomNavigationBar:
BottomNavigationBar
(
bottomNavigationBar:
BottomNavigationBar
(
type:
BottomNavigationBarType
.
shifting
,
type:
BottomNavigationBarType
.
shifting
,
items:
const
<
BottomNavigationBarItem
>[
items:
const
<
BottomNavigationBarItem
>[
BottomNavigationBarItem
(
BottomNavigationBarItem
(
icon:
Icon
(
Icons
.
ac_unit
),
icon:
Icon
(
Icons
.
ac_unit
),
title:
Text
(
'AC'
),
title:
Text
(
'AC'
),
),
),
BottomNavigationBarItem
(
BottomNavigationBarItem
(
icon:
Icon
(
Icons
.
access_alarm
),
icon:
Icon
(
Icons
.
access_alarm
),
),
),
])));
],
),
),
);
},
throwsA
(
isInstanceOf
<
AssertionError
>()));
},
throwsA
(
isInstanceOf
<
AssertionError
>()));
});
});
...
...
packages/flutter/test/material/raw_material_button_test.dart
View file @
f11c3410
...
@@ -52,23 +52,25 @@ void main() {
...
@@ -52,23 +52,25 @@ void main() {
expect
(
semantics
,
hasSemantics
(
expect
(
semantics
,
hasSemantics
(
TestSemantics
.
root
(
TestSemantics
.
root
(
children:
<
TestSemantics
>[
children:
<
TestSemantics
>[
TestSemantics
(
TestSemantics
(
id:
1
,
id:
1
,
flags:
<
SemanticsFlag
>[
flags:
<
SemanticsFlag
>[
SemanticsFlag
.
isButton
,
SemanticsFlag
.
isButton
,
SemanticsFlag
.
hasEnabledState
,
SemanticsFlag
.
hasEnabledState
,
SemanticsFlag
.
isEnabled
,
SemanticsFlag
.
isEnabled
,
],
],
actions:
<
SemanticsAction
>[
actions:
<
SemanticsAction
>[
SemanticsAction
.
tap
,
SemanticsAction
.
tap
,
],
],
label:
'+'
,
label:
'+'
,
textDirection:
TextDirection
.
ltr
,
textDirection:
TextDirection
.
ltr
,
rect:
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
48.0
,
48.0
),
rect:
const
Rect
.
fromLTRB
(
0.0
,
0.0
,
48.0
,
48.0
),
children:
<
TestSemantics
>[],
children:
<
TestSemantics
>[],
),
),
]
]
),
ignoreTransform:
true
));
),
ignoreTransform:
true
,
));
semantics
.
dispose
();
semantics
.
dispose
();
});
});
...
...
packages/flutter/test/rendering/platform_view_test.dart
View file @
f11c3410
...
@@ -21,12 +21,13 @@ void main() {
...
@@ -21,12 +21,13 @@ void main() {
controller:
fakePlatformViewController
,
controller:
fakePlatformViewController
,
hitTestBehavior:
PlatformViewHitTestBehavior
.
opaque
,
hitTestBehavior:
PlatformViewHitTestBehavior
.
opaque
,
gestureRecognizers:
<
Factory
<
OneSequenceGestureRecognizer
>>{
gestureRecognizers:
<
Factory
<
OneSequenceGestureRecognizer
>>{
Factory
<
VerticalDragGestureRecognizer
>(
Factory
<
VerticalDragGestureRecognizer
>(
()
{
()
{
return
VerticalDragGestureRecognizer
();
return
VerticalDragGestureRecognizer
();
},
},
),
),
},);
},
);
});
});
test
(
'layout should size to max constraint'
,
()
{
test
(
'layout should size to max constraint'
,
()
{
...
...
packages/flutter/test/rendering/table_test.dart
View file @
f11c3410
...
@@ -176,15 +176,21 @@ void main() {
...
@@ -176,15 +176,21 @@ void main() {
final
RenderBox
child2
=
RenderPositionedBox
();
final
RenderBox
child2
=
RenderPositionedBox
();
final
RenderBox
child3
=
RenderPositionedBox
();
final
RenderBox
child3
=
RenderPositionedBox
();
table
=
RenderTable
(
textDirection:
TextDirection
.
ltr
);
table
=
RenderTable
(
textDirection:
TextDirection
.
ltr
);
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
child1
,
RenderPositionedBox
(),
child2
,
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
RenderPositionedBox
(),
child3
,
RenderPositionedBox
()]);
child1
,
RenderPositionedBox
(),
child2
,
RenderPositionedBox
(),
child3
,
RenderPositionedBox
(),
]);
expect
(
table
.
rows
,
equals
(
2
));
expect
(
table
.
rows
,
equals
(
2
));
layout
(
table
);
layout
(
table
);
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
RenderPositionedBox
(),
child1
,
RenderPositionedBox
(),
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
child2
,
RenderPositionedBox
(),
child3
]);
RenderPositionedBox
(),
child1
,
RenderPositionedBox
(),
child2
,
RenderPositionedBox
(),
child3
,
]);
pumpFrame
();
pumpFrame
();
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
RenderPositionedBox
(),
child1
,
RenderPositionedBox
(),
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
child2
,
RenderPositionedBox
(),
child3
]);
RenderPositionedBox
(),
child1
,
RenderPositionedBox
(),
child2
,
RenderPositionedBox
(),
child3
,
]);
pumpFrame
();
pumpFrame
();
expect
(
table
.
columns
,
equals
(
3
));
expect
(
table
.
columns
,
equals
(
3
));
expect
(
table
.
rows
,
equals
(
2
));
expect
(
table
.
rows
,
equals
(
2
));
...
@@ -208,12 +214,16 @@ void main() {
...
@@ -208,12 +214,16 @@ void main() {
table
.
setFlatChildren
(
2
,
<
RenderBox
>[
RenderPositionedBox
(),
RenderPositionedBox
()
]);
table
.
setFlatChildren
(
2
,
<
RenderBox
>[
RenderPositionedBox
(),
RenderPositionedBox
()
]);
pumpFrame
();
pumpFrame
();
expect
(
table
,
paints
..
path
()..
path
()..
path
()..
path
()..
path
());
expect
(
table
,
paints
..
path
()..
path
()..
path
()..
path
()..
path
());
table
.
setFlatChildren
(
2
,
<
RenderBox
>[
RenderPositionedBox
(),
RenderPositionedBox
(),
table
.
setFlatChildren
(
2
,
<
RenderBox
>[
RenderPositionedBox
(),
RenderPositionedBox
()
]);
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
(),
]);
pumpFrame
();
pumpFrame
();
expect
(
table
,
paints
..
path
()..
path
()..
path
()..
path
()..
path
()..
path
());
expect
(
table
,
paints
..
path
()..
path
()..
path
()..
path
()..
path
()..
path
());
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
(),
table
.
setFlatChildren
(
3
,
<
RenderBox
>[
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
()
]);
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
(),
RenderPositionedBox
(),
]);
pumpFrame
();
pumpFrame
();
expect
(
table
,
paints
..
path
()..
path
()..
path
()..
path
()..
path
()..
path
());
expect
(
table
,
paints
..
path
()..
path
()..
path
()..
path
()..
path
()..
path
());
});
});
...
...
packages/flutter/test/services/message_codecs_test.dart
View file @
f11c3410
...
@@ -148,8 +148,10 @@ void main() {
...
@@ -148,8 +148,10 @@ void main() {
checkEncoding
<
dynamic
>(
checkEncoding
<
dynamic
>(
standard
,
standard
,
1.0
,
1.0
,
<
int
>[
6
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
<
int
>[
0
,
0
,
0
,
0
,
0
,
0
,
0xf0
,
0x3f
],
6
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0xf0
,
0x3f
,
],
);
);
});
});
});
});
...
...
packages/flutter/test/widgets/draggable_test.dart
View file @
f11c3410
...
@@ -158,18 +158,20 @@ void main() {
...
@@ -158,18 +158,20 @@ void main() {
onTap:
()
{
onTap:
()
{
events
.
add
(
'tap'
);
events
.
add
(
'tap'
);
},
},
child:
Container
(
child:
const
Text
(
'Button'
),
child:
Container
(
child:
const
Text
(
'Button'
),
),
),
DragTarget
<
int
>(
builder:
(
BuildContext
context
,
List
<
int
>
data
,
List
<
dynamic
>
rejects
)
{
return
IgnorePointer
(
child:
Container
(
child:
const
Text
(
'Target'
)),
);
},
onAccept:
(
int
data
)
{
events
.
add
(
'drop'
);
},
),
),
),
DragTarget
<
int
>(
builder:
(
BuildContext
context
,
List
<
int
>
data
,
List
<
dynamic
>
rejects
)
{
return
IgnorePointer
(
child:
Container
(
child:
const
Text
(
'Target'
)),
);
},
onAccept:
(
int
data
)
{
events
.
add
(
'drop'
);
}),
],
],
),
),
],
],
...
...
packages/flutter/test/widgets/navigator_test.dart
View file @
f11c3410
...
@@ -294,7 +294,7 @@ void main() {
...
@@ -294,7 +294,7 @@ void main() {
testWidgets
(
'popAndPushNamed'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'popAndPushNamed'
,
(
WidgetTester
tester
)
async
{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
popAndPushNamed
(
context
,
'/B'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
popAndPushNamed
(
context
,
'/B'
);
}),
'/B'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'B'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
'/B'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'B'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
};
};
...
@@ -321,7 +321,7 @@ void main() {
...
@@ -321,7 +321,7 @@ void main() {
testWidgets
(
'Push and pop should trigger the observers'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Push and pop should trigger the observers'
,
(
WidgetTester
tester
)
async
{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
};
};
bool
isPushed
=
false
;
bool
isPushed
=
false
;
...
@@ -381,7 +381,7 @@ void main() {
...
@@ -381,7 +381,7 @@ void main() {
testWidgets
(
'Add and remove an observer should work'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Add and remove an observer should work'
,
(
WidgetTester
tester
)
async
{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
};
};
bool
isPushed
=
false
;
bool
isPushed
=
false
;
...
@@ -428,7 +428,7 @@ void main() {
...
@@ -428,7 +428,7 @@ void main() {
testWidgets
(
'replaceNamed'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'replaceNamed'
,
(
WidgetTester
tester
)
async
{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushReplacementNamed
(
context
,
'/A'
);
}),
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushReplacementNamed
(
context
,
'/A'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pushReplacementNamed
(
context
,
'/B'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pushReplacementNamed
(
context
,
'/B'
);
}),
'/B'
:
(
BuildContext
context
)
=>
const
OnTapPage
(
id:
'B'
),
'/B'
:
(
BuildContext
context
)
=>
const
OnTapPage
(
id:
'B'
),
};
};
...
@@ -452,7 +452,7 @@ void main() {
...
@@ -452,7 +452,7 @@ void main() {
Future
<
String
>
value
;
Future
<
String
>
value
;
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
value
=
Navigator
.
pushReplacementNamed
(
context
,
'/B'
,
result:
'B'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
value
=
Navigator
.
pushReplacementNamed
(
context
,
'/B'
,
result:
'B'
);
}),
'/B'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'B'
,
onTap:
()
{
Navigator
.
pop
(
context
,
'B'
);
}),
'/B'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'B'
,
onTap:
()
{
Navigator
.
pop
(
context
,
'B'
);
}),
};
};
...
@@ -499,7 +499,7 @@ void main() {
...
@@ -499,7 +499,7 @@ void main() {
testWidgets
(
'removeRoute'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'removeRoute'
,
(
WidgetTester
tester
)
async
{
final
Map
<
String
,
WidgetBuilder
>
pageBuilders
=
<
String
,
WidgetBuilder
>{
final
Map
<
String
,
WidgetBuilder
>
pageBuilders
=
<
String
,
WidgetBuilder
>{
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/B'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/B'
);
}),
'/B'
:
(
BuildContext
context
)
=>
const
OnTapPage
(
id:
'B'
),
'/B'
:
(
BuildContext
context
)
=>
const
OnTapPage
(
id:
'B'
),
};
};
...
@@ -683,7 +683,7 @@ void main() {
...
@@ -683,7 +683,7 @@ void main() {
testWidgets
(
'didStartUserGesture observable'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'didStartUserGesture observable'
,
(
WidgetTester
tester
)
async
{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
final
Map
<
String
,
WidgetBuilder
>
routes
=
<
String
,
WidgetBuilder
>{
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'/'
,
onTap:
()
{
Navigator
.
pushNamed
(
context
,
'/A'
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
'/A'
:
(
BuildContext
context
)
=>
OnTapPage
(
id:
'A'
,
onTap:
()
{
Navigator
.
pop
(
context
);
}),
};
};
...
...
packages/flutter/test/widgets/overscroll_indicator_test.dart
View file @
f11c3410
...
@@ -72,7 +72,7 @@ void main() {
...
@@ -72,7 +72,7 @@ void main() {
width:
600.0
,
width:
600.0
,
child:
const
CustomScrollView
(
child:
const
CustomScrollView
(
slivers:
<
Widget
>[
slivers:
<
Widget
>[
SliverToBoxAdapter
(
child:
SizedBox
(
height:
2000.0
)),
SliverToBoxAdapter
(
child:
SizedBox
(
height:
2000.0
)),
],
],
),
),
),
),
...
...
packages/flutter/test/widgets/sliver_fill_remaining_test.dart
View file @
f11c3410
...
@@ -104,11 +104,11 @@ void main() {
...
@@ -104,11 +104,11 @@ void main() {
testWidgets
(
'scrolls beyond viewport by default'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'scrolls beyond viewport by default'
,
(
WidgetTester
tester
)
async
{
final
ScrollController
controller
=
ScrollController
();
final
ScrollController
controller
=
ScrollController
();
final
List
<
Widget
>
slivers
=
<
Widget
>[
final
List
<
Widget
>
slivers
=
<
Widget
>[
sliverBox
,
sliverBox
,
SliverFillRemaining
(
SliverFillRemaining
(
child:
Container
(
color:
Colors
.
white
),
child:
Container
(
color:
Colors
.
white
),
),
),
];
];
await
tester
.
pumpWidget
(
boilerplate
(
slivers
,
controller:
controller
));
await
tester
.
pumpWidget
(
boilerplate
(
slivers
,
controller:
controller
));
expect
(
controller
.
offset
,
0.0
);
expect
(
controller
.
offset
,
0.0
);
expect
(
find
.
byType
(
Container
),
findsNWidgets
(
2
));
expect
(
find
.
byType
(
Container
),
findsNWidgets
(
2
));
...
...
packages/flutter/test/widgets/sliver_semantics_test.dart
View file @
f11c3410
...
@@ -55,7 +55,7 @@ void _tests() {
...
@@ -55,7 +55,7 @@ void _tests() {
expandedHeight:
appBarExpandedHeight
,
expandedHeight:
appBarExpandedHeight
,
title:
Text
(
'Semantics Test with Slivers'
),
title:
Text
(
'Semantics Test with Slivers'
),
),
),
SliverList
(
SliverList
(
delegate:
SliverChildListDelegate
(
listChildren
),
delegate:
SliverChildListDelegate
(
listChildren
),
),
),
],
],
...
...
packages/flutter_tools/lib/src/build_runner/build_runner.dart
View file @
f11c3410
...
@@ -163,8 +163,8 @@ class BuildRunner extends CodeGenerator {
...
@@ -163,8 +163,8 @@ class BuildRunner extends CodeGenerator {
'--packages=
$scriptPackagesPath
'
,
'--packages=
$scriptPackagesPath
'
,
buildSnapshot
.
path
,
buildSnapshot
.
path
,
'daemon'
,
'daemon'
,
'--skip-build-script-check'
,
'--skip-build-script-check'
,
'--delete-conflicting-outputs'
,
'--delete-conflicting-outputs'
,
];
];
buildDaemonClient
=
await
BuildDaemonClient
.
connect
(
buildDaemonClient
=
await
BuildDaemonClient
.
connect
(
flutterProject
.
directory
.
path
,
flutterProject
.
directory
.
path
,
...
...
packages/flutter_tools/lib/src/build_runner/build_script.dart
View file @
f11c3410
...
@@ -58,8 +58,7 @@ const Set<String> skipPlatformCheckPackages = <String>{
...
@@ -58,8 +58,7 @@ const Set<String> skipPlatformCheckPackages = <String>{
'video_player'
,
'video_player'
,
};
};
final
DartPlatform
flutterWebPlatform
=
final
DartPlatform
flutterWebPlatform
=
DartPlatform
.
register
(
'flutter_web'
,
<
String
>[
DartPlatform
.
register
(
'flutter_web'
,
<
String
>[
'async'
,
'async'
,
'collection'
,
'collection'
,
'convert'
,
'convert'
,
...
@@ -208,14 +207,14 @@ class FlutterWebTestEntrypointBuilder implements Builder {
...
@@ -208,14 +207,14 @@ class FlutterWebTestEntrypointBuilder implements Builder {
@override
@override
Map
<
String
,
List
<
String
>>
get
buildExtensions
=>
const
<
String
,
List
<
String
>>{
Map
<
String
,
List
<
String
>>
get
buildExtensions
=>
const
<
String
,
List
<
String
>>{
'.dart'
:
<
String
>[
'.dart'
:
<
String
>[
ddcBootstrapExtension
,
ddcBootstrapExtension
,
jsEntrypointExtension
,
jsEntrypointExtension
,
jsEntrypointSourceMapExtension
,
jsEntrypointSourceMapExtension
,
jsEntrypointArchiveExtension
,
jsEntrypointArchiveExtension
,
digestsEntrypointExtension
,
digestsEntrypointExtension
,
],
],
};
};
@override
@override
Future
<
void
>
build
(
BuildStep
buildStep
)
async
{
Future
<
void
>
build
(
BuildStep
buildStep
)
async
{
...
@@ -235,14 +234,14 @@ class FlutterWebEntrypointBuilder implements Builder {
...
@@ -235,14 +234,14 @@ class FlutterWebEntrypointBuilder implements Builder {
@override
@override
Map
<
String
,
List
<
String
>>
get
buildExtensions
=>
const
<
String
,
List
<
String
>>{
Map
<
String
,
List
<
String
>>
get
buildExtensions
=>
const
<
String
,
List
<
String
>>{
'.dart'
:
<
String
>[
'.dart'
:
<
String
>[
ddcBootstrapExtension
,
ddcBootstrapExtension
,
jsEntrypointExtension
,
jsEntrypointExtension
,
jsEntrypointSourceMapExtension
,
jsEntrypointSourceMapExtension
,
jsEntrypointArchiveExtension
,
jsEntrypointArchiveExtension
,
digestsEntrypointExtension
,
digestsEntrypointExtension
,
],
],
};
};
@override
@override
Future
<
void
>
build
(
BuildStep
buildStep
)
async
{
Future
<
void
>
build
(
BuildStep
buildStep
)
async
{
...
...
packages/flutter_tools/lib/src/build_system/targets/dart.dart
View file @
f11c3410
...
@@ -73,7 +73,7 @@ class CopyFlutterBundle extends Target {
...
@@ -73,7 +73,7 @@ class CopyFlutterBundle extends Target {
Source
.
artifact
(
Artifact
.
vmSnapshotData
,
mode:
BuildMode
.
debug
),
Source
.
artifact
(
Artifact
.
vmSnapshotData
,
mode:
BuildMode
.
debug
),
Source
.
artifact
(
Artifact
.
isolateSnapshotData
,
mode:
BuildMode
.
debug
),
Source
.
artifact
(
Artifact
.
isolateSnapshotData
,
mode:
BuildMode
.
debug
),
Source
.
pattern
(
'{BUILD_DIR}/app.dill'
),
Source
.
pattern
(
'{BUILD_DIR}/app.dill'
),
Source
.
behavior
(
AssetOutputBehavior
())
Source
.
behavior
(
AssetOutputBehavior
())
,
];
];
@override
@override
...
@@ -84,7 +84,7 @@ class CopyFlutterBundle extends Target {
...
@@ -84,7 +84,7 @@ class CopyFlutterBundle extends Target {
Source
.
pattern
(
'{OUTPUT_DIR}/AssetManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/AssetManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/FontManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/FontManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/LICENSE'
),
Source
.
pattern
(
'{OUTPUT_DIR}/LICENSE'
),
Source
.
behavior
(
AssetOutputBehavior
())
Source
.
behavior
(
AssetOutputBehavior
())
,
];
];
@override
@override
...
@@ -157,7 +157,7 @@ class ReleaseCopyFlutterBundle extends CopyFlutterBundle {
...
@@ -157,7 +157,7 @@ class ReleaseCopyFlutterBundle extends CopyFlutterBundle {
Source
.
pattern
(
'{OUTPUT_DIR}/AssetManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/AssetManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/FontManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/FontManifest.json'
),
Source
.
pattern
(
'{OUTPUT_DIR}/LICENSE'
),
Source
.
pattern
(
'{OUTPUT_DIR}/LICENSE'
),
Source
.
behavior
(
AssetOutputBehavior
())
Source
.
behavior
(
AssetOutputBehavior
())
,
];
];
@override
@override
...
...
packages/flutter_tools/lib/src/bundle.dart
View file @
f11c3410
...
@@ -163,7 +163,7 @@ Future<void> buildWithAssemble({
...
@@ -163,7 +163,7 @@ Future<void> buildWithAssemble({
kTargetFile:
mainPath
,
kTargetFile:
mainPath
,
kBuildMode:
getNameForBuildMode
(
buildMode
),
kBuildMode:
getNameForBuildMode
(
buildMode
),
kTargetPlatform:
getNameForTargetPlatform
(
targetPlatform
),
kTargetPlatform:
getNameForTargetPlatform
(
targetPlatform
),
}
}
,
);
);
final
Target
target
=
buildMode
==
BuildMode
.
debug
final
Target
target
=
buildMode
==
BuildMode
.
debug
?
const
CopyFlutterBundle
()
?
const
CopyFlutterBundle
()
...
...
packages/flutter_tools/lib/src/commands/unpack.dart
View file @
f11c3410
...
@@ -12,8 +12,7 @@ import '../globals.dart';
...
@@ -12,8 +12,7 @@ import '../globals.dart';
import
'../runner/flutter_command.dart'
;
import
'../runner/flutter_command.dart'
;
/// The directory in the Flutter cache for each platform's artifacts.
/// The directory in the Flutter cache for each platform's artifacts.
const
Map
<
TargetPlatform
,
String
>
flutterArtifactPlatformDirectory
=
const
Map
<
TargetPlatform
,
String
>
flutterArtifactPlatformDirectory
=
<
TargetPlatform
,
String
>{
<
TargetPlatform
,
String
>{
TargetPlatform
.
linux_x64
:
'linux-x64'
,
TargetPlatform
.
linux_x64
:
'linux-x64'
,
TargetPlatform
.
darwin_x64
:
'darwin-x64'
,
TargetPlatform
.
darwin_x64
:
'darwin-x64'
,
TargetPlatform
.
windows_x64
:
'windows-x64'
,
TargetPlatform
.
windows_x64
:
'windows-x64'
,
...
...
packages/flutter_tools/lib/src/doctor.dart
View file @
f11c3410
...
@@ -802,7 +802,7 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
...
@@ -802,7 +802,7 @@ class IntelliJValidatorOnMac extends IntelliJValidator {
validators
.
add
(
ValidatorWithResult
(
validators
.
add
(
ValidatorWithResult
(
userMessages
.
intellijMacUnknownResult
,
userMessages
.
intellijMacUnknownResult
,
ValidationResult
(
ValidationType
.
missing
,
<
ValidationMessage
>[
ValidationResult
(
ValidationType
.
missing
,
<
ValidationMessage
>[
ValidationMessage
.
error
(
e
.
message
),
ValidationMessage
.
error
(
e
.
message
),
]),
]),
));
));
}
}
...
...
packages/flutter_tools/lib/src/test/flutter_web_platform.dart
View file @
f11c3410
...
@@ -245,11 +245,11 @@ class FlutterWebPlatform extends PlatformPlugin {
...
@@ -245,11 +245,11 @@ class FlutterWebPlatform extends PlatformPlugin {
_webSocketHandler
.
create
(
webSocketHandler
(
completer
.
complete
));
_webSocketHandler
.
create
(
webSocketHandler
(
completer
.
complete
));
final
Uri
webSocketUrl
=
url
.
replace
(
scheme:
'ws'
).
resolve
(
path
);
final
Uri
webSocketUrl
=
url
.
replace
(
scheme:
'ws'
).
resolve
(
path
);
final
Uri
hostUrl
=
url
final
Uri
hostUrl
=
url
.
resolve
(
'static/index.html'
)
.
resolve
(
'static/index.html'
)
.
replace
(
queryParameters:
<
String
,
String
>{
.
replace
(
queryParameters:
<
String
,
String
>{
'managerUrl'
:
webSocketUrl
.
toString
(),
'managerUrl'
:
webSocketUrl
.
toString
(),
'debug'
:
_config
.
pauseAfterLoad
.
toString
(),
'debug'
:
_config
.
pauseAfterLoad
.
toString
(),
});
});
printTrace
(
'Serving tests at
$hostUrl
'
);
printTrace
(
'Serving tests at
$hostUrl
'
);
...
@@ -559,8 +559,7 @@ class BrowserManager {
...
@@ -559,8 +559,7 @@ class BrowserManager {
Object
message
,
{
Object
message
,
{
StackTraceMapper
mapper
,
StackTraceMapper
mapper
,
})
async
{
})
async
{
url
=
url
.
replace
(
url
=
url
.
replace
(
fragment:
Uri
.
encodeFull
(
jsonEncode
(<
String
,
Object
>{
fragment:
Uri
.
encodeFull
(
jsonEncode
(<
String
,
Object
>{
'metadata'
:
suiteConfig
.
metadata
.
serialize
(),
'metadata'
:
suiteConfig
.
metadata
.
serialize
(),
'browser'
:
_runtime
.
identifier
,
'browser'
:
_runtime
.
identifier
,
})));
})));
...
...
packages/flutter_tools/lib/src/version.dart
View file @
f11c3410
...
@@ -120,14 +120,14 @@ class FlutterVersion {
...
@@ -120,14 +120,14 @@ class FlutterVersion {
}
}
Map
<
String
,
Object
>
toJson
()
=>
<
String
,
Object
>{
Map
<
String
,
Object
>
toJson
()
=>
<
String
,
Object
>{
'frameworkVersion'
:
frameworkVersion
??
'unknown'
,
'frameworkVersion'
:
frameworkVersion
??
'unknown'
,
'channel'
:
channel
,
'channel'
:
channel
,
'repositoryUrl'
:
repositoryUrl
??
'unknown source'
,
'repositoryUrl'
:
repositoryUrl
??
'unknown source'
,
'frameworkRevision'
:
frameworkRevision
,
'frameworkRevision'
:
frameworkRevision
,
'frameworkCommitDate'
:
frameworkCommitDate
,
'frameworkCommitDate'
:
frameworkCommitDate
,
'engineRevision'
:
engineRevision
,
'engineRevision'
:
engineRevision
,
'dartSdkVersion'
:
dartSdkVersion
,
'dartSdkVersion'
:
dartSdkVersion
,
};
};
/// A date String describing the last framework commit.
/// A date String describing the last framework commit.
String
get
frameworkCommitDate
=>
_latestGitCommitDate
();
String
get
frameworkCommitDate
=>
_latestGitCommitDate
();
...
...
packages/flutter_tools/lib/src/vmservice.dart
View file @
f11c3410
...
@@ -331,8 +331,8 @@ class VMService {
...
@@ -331,8 +331,8 @@ class VMService {
Map
<
String
,
dynamic
>
params
,
Map
<
String
,
dynamic
>
params
,
)
{
)
{
return
Future
.
any
<
Map
<
String
,
dynamic
>>(<
Future
<
Map
<
String
,
dynamic
>>>[
return
Future
.
any
<
Map
<
String
,
dynamic
>>(<
Future
<
Map
<
String
,
dynamic
>>>[
_peer
.
sendRequest
(
method
,
params
).
then
<
Map
<
String
,
dynamic
>>(
castStringKeyedMap
),
_peer
.
sendRequest
(
method
,
params
).
then
<
Map
<
String
,
dynamic
>>(
castStringKeyedMap
),
_connectionError
.
future
,
_connectionError
.
future
,
]);
]);
}
}
...
...
packages/flutter_tools/test/general.shard/android/android_workflow_test.dart
View file @
f11c3410
...
@@ -88,8 +88,8 @@ void main() {
...
@@ -88,8 +88,8 @@ void main() {
testUsingContext
(
'licensesAccepted works for all licenses accepted'
,
()
async
{
testUsingContext
(
'licensesAccepted works for all licenses accepted'
,
()
async
{
when
(
sdk
.
sdkManagerPath
).
thenReturn
(
'/foo/bar/sdkmanager'
);
when
(
sdk
.
sdkManagerPath
).
thenReturn
(
'/foo/bar/sdkmanager'
);
processManager
.
processFactory
=
processMetaFactory
(<
String
>[
processManager
.
processFactory
=
processMetaFactory
(<
String
>[
'[=======================================] 100% Computing updates... '
,
'[=======================================] 100% Computing updates... '
,
'All SDK package licenses accepted.'
,
'All SDK package licenses accepted.'
,
]);
]);
final
AndroidLicenseValidator
licenseValidator
=
AndroidLicenseValidator
();
final
AndroidLicenseValidator
licenseValidator
=
AndroidLicenseValidator
();
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
f11c3410
...
@@ -1401,14 +1401,14 @@ plugin2=${plugin2.path}
...
@@ -1401,14 +1401,14 @@ plugin2=${plugin2.path}
expect
(
actualGradlewCall
,
contains
(
'/path/to/project/.android/gradlew'
));
expect
(
actualGradlewCall
,
contains
(
'/path/to/project/.android/gradlew'
));
expect
(
actualGradlewCall
,
contains
(
'-PlocalEngineOut=out/android_arm'
));
expect
(
actualGradlewCall
,
contains
(
'-PlocalEngineOut=out/android_arm'
));
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
AndroidSdk:
()
=>
mockAndroidSdk
,
AndroidSdk:
()
=>
mockAndroidSdk
,
AndroidStudio:
()
=>
mockAndroidStudio
,
AndroidStudio:
()
=>
mockAndroidStudio
,
Artifacts:
()
=>
mockArtifacts
,
Artifacts:
()
=>
mockArtifacts
,
Cache:
()
=>
cache
,
Cache:
()
=>
cache
,
ProcessManager:
()
=>
mockProcessManager
,
ProcessManager:
()
=>
mockProcessManager
,
Platform:
()
=>
android
,
Platform:
()
=>
android
,
FileSystem:
()
=>
fs
,
FileSystem:
()
=>
fs
,
});
});
});
});
}
}
...
...
packages/flutter_tools/test/general.shard/base/build_test.dart
View file @
f11c3410
...
@@ -118,14 +118,15 @@ void main() {
...
@@ -118,14 +118,15 @@ void main() {
SnapshotType
(
TargetPlatform
.
android_x64
,
BuildMode
.
release
),
SnapshotType
(
TargetPlatform
.
android_x64
,
BuildMode
.
release
),
darwinArch:
null
,
darwinArch:
null
,
additionalArgs:
<
String
>[
'--additional_arg'
]);
additionalArgs:
<
String
>[
'--additional_arg'
]);
verify
(
mockProcessManager
.
start
(<
String
>[
verify
(
mockProcessManager
.
start
(
'gen_snapshot'
,
<
String
>[
'--causal_async_stacks'
,
'gen_snapshot'
,
'--additional_arg'
'--causal_async_stacks'
,
],
'--additional_arg'
,
workingDirectory:
anyNamed
(
'workingDirectory'
),
],
environment:
anyNamed
(
'environment'
)))
workingDirectory:
anyNamed
(
'workingDirectory'
),
.
called
(
1
);
environment:
anyNamed
(
'environment'
),
)).
called
(
1
);
},
overrides:
contextOverrides
);
},
overrides:
contextOverrides
);
testUsingContext
(
'iOS armv7'
,
()
async
{
testUsingContext
(
'iOS armv7'
,
()
async
{
...
@@ -142,14 +143,15 @@ void main() {
...
@@ -142,14 +143,15 @@ void main() {
snapshotType:
SnapshotType
(
TargetPlatform
.
ios
,
BuildMode
.
release
),
snapshotType:
SnapshotType
(
TargetPlatform
.
ios
,
BuildMode
.
release
),
darwinArch:
DarwinArch
.
armv7
,
darwinArch:
DarwinArch
.
armv7
,
additionalArgs:
<
String
>[
'--additional_arg'
]);
additionalArgs:
<
String
>[
'--additional_arg'
]);
verify
(
mockProcessManager
.
start
(<
String
>[
verify
(
mockProcessManager
.
start
(
'gen_snapshot_armv7'
,
<
String
>[
'--causal_async_stacks'
,
'gen_snapshot_armv7'
,
'--additional_arg'
'--causal_async_stacks'
,
],
'--additional_arg'
,
workingDirectory:
anyNamed
(
'workingDirectory'
),
],
environment:
anyNamed
(
'environment'
)))
workingDirectory:
anyNamed
(
'workingDirectory'
),
.
called
(
1
);
environment:
anyNamed
(
'environment'
)),
).
called
(
1
);
},
overrides:
contextOverrides
);
},
overrides:
contextOverrides
);
testUsingContext
(
'iOS arm64'
,
()
async
{
testUsingContext
(
'iOS arm64'
,
()
async
{
...
@@ -166,14 +168,15 @@ void main() {
...
@@ -166,14 +168,15 @@ void main() {
snapshotType:
SnapshotType
(
TargetPlatform
.
ios
,
BuildMode
.
release
),
snapshotType:
SnapshotType
(
TargetPlatform
.
ios
,
BuildMode
.
release
),
darwinArch:
DarwinArch
.
arm64
,
darwinArch:
DarwinArch
.
arm64
,
additionalArgs:
<
String
>[
'--additional_arg'
]);
additionalArgs:
<
String
>[
'--additional_arg'
]);
verify
(
mockProcessManager
.
start
(<
String
>[
verify
(
mockProcessManager
.
start
(
'gen_snapshot_arm64'
,
<
String
>[
'--causal_async_stacks'
,
'gen_snapshot_arm64'
,
'--additional_arg'
'--causal_async_stacks'
,
],
'--additional_arg'
,
workingDirectory:
anyNamed
(
'workingDirectory'
),
],
environment:
anyNamed
(
'environment'
)))
workingDirectory:
anyNamed
(
'workingDirectory'
),
.
called
(
1
);
environment:
anyNamed
(
'environment'
),
)).
called
(
1
);
},
overrides:
contextOverrides
);
},
overrides:
contextOverrides
);
testUsingContext
(
'--strip filters outputs'
,
()
async
{
testUsingContext
(
'--strip filters outputs'
,
()
async
{
...
@@ -187,11 +190,12 @@ void main() {
...
@@ -187,11 +190,12 @@ void main() {
.
thenAnswer
((
_
)
=>
Future
<
Process
>.
value
(
mockProc
));
.
thenAnswer
((
_
)
=>
Future
<
Process
>.
value
(
mockProc
));
when
(
mockProc
.
stdout
).
thenAnswer
((
_
)
=>
const
Stream
<
List
<
int
>>.
empty
());
when
(
mockProc
.
stdout
).
thenAnswer
((
_
)
=>
const
Stream
<
List
<
int
>>.
empty
());
when
(
mockProc
.
stderr
)
when
(
mockProc
.
stderr
)
.
thenAnswer
((
_
)
=>
Stream
<
String
>.
fromIterable
(<
String
>[
.
thenAnswer
((
_
)
=>
Stream
<
String
>.
fromIterable
(<
String
>[
'--ABC
\n
'
,
'--ABC
\n
'
,
'Warning: Generating ELF library without DWARF debugging information.
\n
'
,
'Warning: Generating ELF library without DWARF debugging information.
\n
'
,
'--XYZ
\n
'
'--XYZ
\n
'
,
]).
transform
<
List
<
int
>>(
utf8
.
encoder
));
])
.
transform
<
List
<
int
>>(
utf8
.
encoder
));
await
genSnapshot
.
run
(
await
genSnapshot
.
run
(
snapshotType:
snapshotType:
SnapshotType
(
TargetPlatform
.
android_x64
,
BuildMode
.
release
),
SnapshotType
(
TargetPlatform
.
android_x64
,
BuildMode
.
release
),
...
...
packages/flutter_tools/test/general.shard/build_system/targets/dart_test.dart
View file @
f11c3410
...
@@ -188,12 +188,12 @@ flutter_tools:lib/''');
...
@@ -188,12 +188,12 @@ flutter_tools:lib/''');
});
});
await
const
KernelSnapshot
().
build
(
Environment
(
await
const
KernelSnapshot
().
build
(
Environment
(
outputDir:
fs
.
currentDirectory
,
outputDir:
fs
.
currentDirectory
,
projectDir:
fs
.
currentDirectory
,
projectDir:
fs
.
currentDirectory
,
defines:
<
String
,
String
>{
defines:
<
String
,
String
>{
kBuildMode:
'debug'
,
kBuildMode:
'debug'
,
kTargetPlatform:
getNameForTargetPlatform
(
TargetPlatform
.
android_arm
),
kTargetPlatform:
getNameForTargetPlatform
(
TargetPlatform
.
android_arm
),
}));
}));
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
KernelCompilerFactory:
()
=>
MockKernelCompilerFactory
(),
KernelCompilerFactory:
()
=>
MockKernelCompilerFactory
(),
}));
}));
...
...
packages/flutter_tools/test/general.shard/commands/build_linux_test.dart
View file @
f11c3410
...
@@ -170,7 +170,7 @@ BINARY_NAME=fizz_bar
...
@@ -170,7 +170,7 @@ BINARY_NAME=fizz_bar
expect
(
BuildLinuxCommand
().
hidden
,
true
);
expect
(
BuildLinuxCommand
().
hidden
,
true
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isLinuxEnabled:
false
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isLinuxEnabled:
false
),
Platform:
()
=>
MockPlatform
(),
Platform:
()
=>
MockPlatform
(),
});
});
testUsingContext
(
'Not hidden when enabled and on Linux host'
,
()
{
testUsingContext
(
'Not hidden when enabled and on Linux host'
,
()
{
...
...
packages/flutter_tools/test/general.shard/commands/build_macos_test.dart
View file @
f11c3410
...
@@ -187,7 +187,7 @@ void main() {
...
@@ -187,7 +187,7 @@ void main() {
expect
(
BuildMacosCommand
().
hidden
,
true
);
expect
(
BuildMacosCommand
().
hidden
,
true
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
false
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isMacOSEnabled:
false
),
Platform:
()
=>
MockPlatform
(),
Platform:
()
=>
MockPlatform
(),
});
});
testUsingContext
(
'Not hidden when enabled and on macOS host'
,
()
{
testUsingContext
(
'Not hidden when enabled and on macOS host'
,
()
{
...
...
packages/flutter_tools/test/general.shard/commands/build_windows_test.dart
View file @
f11c3410
...
@@ -181,7 +181,7 @@ void main() {
...
@@ -181,7 +181,7 @@ void main() {
expect
(
BuildWindowsCommand
().
hidden
,
true
);
expect
(
BuildWindowsCommand
().
hidden
,
true
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FeatureFlags:
()
=>
TestFeatureFlags
(
isWindowsEnabled:
false
),
FeatureFlags:
()
=>
TestFeatureFlags
(
isWindowsEnabled:
false
),
Platform:
()
=>
MockPlatform
(),
Platform:
()
=>
MockPlatform
(),
});
});
testUsingContext
(
'Not hidden when enabled and on Windows host'
,
()
{
testUsingContext
(
'Not hidden when enabled and on Windows host'
,
()
{
...
...
packages/flutter_tools/test/general.shard/commands/precache_test.dart
View file @
f11c3410
...
@@ -114,17 +114,17 @@ void main() {
...
@@ -114,17 +114,17 @@ void main() {
applyMocksToCommand
(
command
);
applyMocksToCommand
(
command
);
await
createTestCommandRunner
(
command
).
run
(
await
createTestCommandRunner
(
command
).
run
(
const
<
String
>[
const
<
String
>[
'precache'
,
'precache'
,
'--ios'
,
'--ios'
,
'--android_gen_snapshot'
,
'--android_gen_snapshot'
,
'--android_maven'
,
'--android_maven'
,
'--android_internal_build'
,
'--android_internal_build'
,
'--web'
,
'--web'
,
'--macos'
,
'--macos'
,
'--linux'
,
'--linux'
,
'--windows'
,
'--windows'
,
'--fuchsia'
,
'--fuchsia'
,
'--flutter_runner'
,
'--flutter_runner'
,
]
]
);
);
expect
(
artifacts
,
unorderedEquals
(<
DevelopmentArtifact
>{
expect
(
artifacts
,
unorderedEquals
(<
DevelopmentArtifact
>{
...
...
packages/flutter_tools/test/general.shard/flutter_manifest_test.dart
View file @
f11c3410
...
@@ -208,8 +208,8 @@ flutter:
...
@@ -208,8 +208,8 @@ flutter:
'''
;
'''
;
final
FlutterManifest
flutterManifest
=
FlutterManifest
.
createFromString
(
manifest
);
final
FlutterManifest
flutterManifest
=
FlutterManifest
.
createFromString
(
manifest
);
final
dynamic
expectedFontsDescriptor
=
<
dynamic
>[
final
dynamic
expectedFontsDescriptor
=
<
dynamic
>[
{
'fonts'
:
[{
'asset'
:
'a/bar'
},
{
'style'
:
'italic'
,
'weight'
:
400
,
'asset'
:
'a/bar'
}],
'family'
:
'foo'
},
// ignore: always_specify_types
{
'fonts'
:
[{
'asset'
:
'a/bar'
},
{
'style'
:
'italic'
,
'weight'
:
400
,
'asset'
:
'a/bar'
}],
'family'
:
'foo'
},
// ignore: always_specify_types
{
'fonts'
:
[{
'asset'
:
'a/baz'
},
{
'style'
:
'italic'
,
'weight'
:
400
,
'asset'
:
'a/baz'
}],
'family'
:
'bar'
},
// ignore: always_specify_types
{
'fonts'
:
[{
'asset'
:
'a/baz'
},
{
'style'
:
'italic'
,
'weight'
:
400
,
'asset'
:
'a/baz'
}],
'family'
:
'bar'
},
// ignore: always_specify_types
];
];
expect
(
flutterManifest
.
fontsDescriptor
,
expectedFontsDescriptor
);
expect
(
flutterManifest
.
fontsDescriptor
,
expectedFontsDescriptor
);
final
List
<
Font
>
fonts
=
flutterManifest
.
fonts
;
final
List
<
Font
>
fonts
=
flutterManifest
.
fonts
;
...
...
packages/flutter_tools/test/general.shard/ios/simulators_test.dart
View file @
f11c3410
...
@@ -222,12 +222,12 @@ void main() {
...
@@ -222,12 +222,12 @@ void main() {
await
deviceUnderTest
.
takeScreenshot
(
mockFile
);
await
deviceUnderTest
.
takeScreenshot
(
mockFile
);
verify
(
mockProcessManager
.
run
(
verify
(
mockProcessManager
.
run
(
<
String
>[
<
String
>[
'/usr/bin/xcrun'
,
'/usr/bin/xcrun'
,
'simctl'
,
'simctl'
,
'io'
,
'io'
,
'x'
,
'x'
,
'screenshot'
,
'screenshot'
,
fs
.
path
.
join
(
'some'
,
'path'
,
'to'
,
'screenshot.png'
),
fs
.
path
.
join
(
'some'
,
'path'
,
'to'
,
'screenshot.png'
),
],
],
environment:
null
,
environment:
null
,
workingDirectory:
null
,
workingDirectory:
null
,
...
...
packages/flutter_tools/test/general.shard/ios/xcode_backend_test.dart
View file @
f11c3410
...
@@ -35,8 +35,7 @@ const Map<String, String> localEngineDebugBuildModeRelease = <String, String>{
...
@@ -35,8 +35,7 @@ const Map<String, String> localEngineDebugBuildModeRelease = <String, String>{
};
};
// Can't use a debug build with a profile engine.
// Can't use a debug build with a profile engine.
const
Map
<
String
,
String
>
localEngineProfileBuildeModeRelease
=
const
Map
<
String
,
String
>
localEngineProfileBuildeModeRelease
=
<
String
,
String
>{
<
String
,
String
>{
'SOURCE_ROOT'
:
'../../../examples/hello_world'
,
'SOURCE_ROOT'
:
'../../../examples/hello_world'
,
'FLUTTER_ROOT'
:
'../../..'
,
'FLUTTER_ROOT'
:
'../../..'
,
'LOCAL_ENGINE'
:
'/engine/src/out/ios_profile'
,
'LOCAL_ENGINE'
:
'/engine/src/out/ios_profile'
,
...
...
packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
View file @
f11c3410
...
@@ -174,9 +174,9 @@ void main() {
...
@@ -174,9 +174,9 @@ void main() {
testUsingContext
(
'creates swift Podfile if swift'
,
()
async
{
testUsingContext
(
'creates swift Podfile if swift'
,
()
async
{
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
isInstalled
).
thenReturn
(
true
);
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
any
))
when
(
mockXcodeProjectInterpreter
.
getBuildSettings
(
any
,
any
))
.
thenAnswer
((
_
)
async
=>
<
String
,
String
>{
.
thenAnswer
((
_
)
async
=>
<
String
,
String
>{
'SWIFT_VERSION'
:
'4.0'
,
'SWIFT_VERSION'
:
'4.0'
,
});
});
final
FlutterProject
project
=
FlutterProject
.
fromPath
(
'project'
);
final
FlutterProject
project
=
FlutterProject
.
fromPath
(
'project'
);
await
cocoaPodsUnderTest
.
setupPodfile
(
project
.
ios
);
await
cocoaPodsUnderTest
.
setupPodfile
(
project
.
ios
);
...
...
packages/flutter_tools/test/general.shard/project_test.dart
View file @
f11c3410
...
@@ -323,9 +323,9 @@ apply plugin: 'kotlin-android'
...
@@ -323,9 +323,9 @@ apply plugin: 'kotlin-android'
expect
(
await
project
.
ios
.
isSwift
,
isTrue
);
expect
(
await
project
.
ios
.
isSwift
,
isTrue
);
expect
(
project
.
android
.
isKotlin
,
isTrue
);
expect
(
project
.
android
.
isKotlin
,
isTrue
);
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fs
,
FileSystem:
()
=>
fs
,
XcodeProjectInterpreter:
()
=>
mockXcodeProjectInterpreter
,
XcodeProjectInterpreter:
()
=>
mockXcodeProjectInterpreter
,
FlutterProjectFactory:
()
=>
flutterProjectFactory
,
FlutterProjectFactory:
()
=>
flutterProjectFactory
,
});
});
});
});
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_cold_test.dart
View file @
f11c3410
...
@@ -38,18 +38,19 @@ void main() {
...
@@ -38,18 +38,19 @@ void main() {
);
);
},
},
overrides:
<
Type
,
Generator
>{
overrides:
<
Type
,
Generator
>{
WebFsFactory:
()
=>
({
WebFsFactory:
()
=>
({
@required
String
target
,
@required
String
target
,
@required
FlutterProject
flutterProject
,
@required
FlutterProject
flutterProject
,
@required
BuildInfo
buildInfo
,
@required
BuildInfo
buildInfo
,
@required
bool
skipDwds
,
@required
bool
skipDwds
,
@required
bool
initializePlatform
,
@required
bool
initializePlatform
,
@required
String
hostname
,
@required
String
hostname
,
@required
String
port
,
@required
String
port
,
})
async
{
})
async
{
return
mockWebFs
;
return
mockWebFs
;
},
},
},
}
);
);
});
});
void
_setupMocks
()
{
void
_setupMocks
()
{
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
f11c3410
...
@@ -50,18 +50,19 @@ void main() {
...
@@ -50,18 +50,19 @@ void main() {
);
);
},
},
overrides:
<
Type
,
Generator
>{
overrides:
<
Type
,
Generator
>{
WebFsFactory:
()
=>
({
WebFsFactory:
()
=>
({
@required
String
target
,
@required
String
target
,
@required
FlutterProject
flutterProject
,
@required
FlutterProject
flutterProject
,
@required
BuildInfo
buildInfo
,
@required
BuildInfo
buildInfo
,
@required
bool
skipDwds
,
@required
bool
skipDwds
,
@required
bool
initializePlatform
,
@required
bool
initializePlatform
,
@required
String
hostname
,
@required
String
hostname
,
@required
String
port
,
@required
String
port
,
})
async
{
})
async
{
return
mockWebFs
;
return
mockWebFs
;
},
},
},
}
);
);
});
});
void
_setupMocks
()
{
void
_setupMocks
()
{
...
...
packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart
View file @
f11c3410
...
@@ -156,8 +156,7 @@ void main() {
...
@@ -156,8 +156,7 @@ void main() {
testUsingContext
(
'start'
,
()
async
{
testUsingContext
(
'start'
,
()
async
{
final
Uri
observatoryUri
=
Uri
.
parse
(
'http://127.0.0.1:6666/'
);
final
Uri
observatoryUri
=
Uri
.
parse
(
'http://127.0.0.1:6666/'
);
mockProcess
=
MockProcess
(
mockProcess
=
MockProcess
(
stdout:
Stream
<
List
<
int
>>.
fromIterable
(<
List
<
int
>>[
stdout:
Stream
<
List
<
int
>>.
fromIterable
(<
List
<
int
>>[
'''
'''
Observatory listening on
$observatoryUri
Observatory listening on
$observatoryUri
Hello!
Hello!
...
...
packages/flutter_tools/test/general.shard/windows/visual_studio_test.dart
View file @
f11c3410
...
@@ -43,7 +43,7 @@ void main() {
...
@@ -43,7 +43,7 @@ void main() {
'isPrerelease'
:
false
,
'isPrerelease'
:
false
,
'catalog'
:
<
String
,
dynamic
>{
'catalog'
:
<
String
,
dynamic
>{
'productDisplayVersion'
:
'16.2.5'
,
'productDisplayVersion'
:
'16.2.5'
,
}
}
,
};
};
// A version of a response that doesn't include certain installation status
// A version of a response that doesn't include certain installation status
...
@@ -87,12 +87,12 @@ void main() {
...
@@ -87,12 +87,12 @@ void main() {
when
(
mockProcessManager
.
runSync
(
when
(
mockProcessManager
.
runSync
(
<
String
>[
<
String
>[
vswherePath
,
vswherePath
,
'-format'
,
'-format'
,
'json'
,
'json'
,
'-utf8'
,
'-utf8'
,
'-latest'
,
'-latest'
,
...?
additionalArguments
,
...?
additionalArguments
,
...?
requirementArguments
,
...?
requirementArguments
,
],
],
workingDirectory:
anyNamed
(
'workingDirectory'
),
workingDirectory:
anyNamed
(
'workingDirectory'
),
environment:
anyNamed
(
'environment'
),
environment:
anyNamed
(
'environment'
),
...
@@ -415,7 +415,7 @@ void main() {
...
@@ -415,7 +415,7 @@ void main() {
'installationVersion'
:
'15.9.28307.665'
,
'installationVersion'
:
'15.9.28307.665'
,
'catalog'
:
<
String
,
dynamic
>{
'catalog'
:
<
String
,
dynamic
>{
'productDisplayVersion'
:
'15.9.12'
,
'productDisplayVersion'
:
'15.9.12'
,
}
}
,
};
};
setMockCompatibleVisualStudioInstallation
(
olderButCompleteVersionResponse
);
setMockCompatibleVisualStudioInstallation
(
olderButCompleteVersionResponse
);
...
...
packages/flutter_tools/test/integration.shard/test_driver.dart
View file @
f11c3410
...
@@ -620,11 +620,11 @@ class FlutterTestTestDriver extends FlutterTestDriver {
...
@@ -620,11 +620,11 @@ class FlutterTestTestDriver extends FlutterTestDriver {
Future
<
void
>
Function
()
beforeStart
,
Future
<
void
>
Function
()
beforeStart
,
})
async
{
})
async
{
await
_setupProcess
(<
String
>[
await
_setupProcess
(<
String
>[
'test'
,
'test'
,
'--disable-service-auth-codes'
,
'--disable-service-auth-codes'
,
'--machine'
,
'--machine'
,
'-d'
,
'-d'
,
'flutter-tester'
,
'flutter-tester'
,
],
script:
testFile
,
withDebugger:
withDebugger
,
pauseOnExceptions:
pauseOnExceptions
,
pidFile:
pidFile
,
beforeStart:
beforeStart
);
],
script:
testFile
,
withDebugger:
withDebugger
,
pauseOnExceptions:
pauseOnExceptions
,
pidFile:
pidFile
,
beforeStart:
beforeStart
);
}
}
...
...
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