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
7aa17231
Unverified
Commit
7aa17231
authored
Feb 04, 2021
by
Kate Lovett
Committed by
GitHub
Feb 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Reland "Update PopupMenuButton to match Material Design spec"" (#75338)
parent
f69f06e5
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
92 additions
and
306 deletions
+92
-306
main_test.dart
...ests/android_semantics_testing/test_driver/main_test.dart
+15
-22
popup_menu.dart
packages/flutter/lib/src/material/popup_menu.dart
+35
-115
popup_menu_test.dart
packages/flutter/test/material/popup_menu_test.dart
+26
-151
text_test.dart
packages/flutter_localizations/test/text_test.dart
+16
-18
No files found.
dev/integration_tests/android_semantics_testing/test_driver/main_test.dart
View file @
7aa17231
...
...
@@ -409,14 +409,8 @@ void main() {
});
test
(
'Popup Menu has correct Android semantics'
,
()
async
{
final
SerializableFinder
button
=
find
.
descendant
(
of:
find
.
byValueKey
(
popupButtonKeyValue
),
matching:
find
.
byType
(
'Semantics'
),
firstMatchOnly:
true
,
);
expect
(
await
getSemantics
(
button
),
await
getSemantics
(
find
.
byValueKey
(
popupButtonKeyValue
)
),
hasAndroidSemantics
(
className:
AndroidClassName
.
button
,
isChecked:
false
,
...
...
@@ -451,8 +445,7 @@ void main() {
AndroidSemanticsAction
.
click
,
],
),
reason:
"Popup
$item
doesn't have the right semantics"
,
);
reason:
"Popup
$item
doesn't have the right semantics"
);
}
await
driver
.
tap
(
find
.
byValueKey
(
'
$popupKeyValue
.
${popupItems.first}
'
));
...
...
packages/flutter/lib/src/material/popup_menu.dart
View file @
7aa17231
This diff is collapsed.
Click to expand it.
packages/flutter/test/material/popup_menu_test.dart
View file @
7aa17231
This diff is collapsed.
Click to expand it.
packages/flutter_localizations/test/text_test.dart
View file @
7aa17231
...
...
@@ -38,7 +38,6 @@ void main() {
key:
targetKey
,
builder:
(
BuildContext
context
)
{
return
PopupMenuButton
<
int
>(
placement:
PopupMenuPlacement
.
belowButton
,
onSelected:
(
int
value
)
{
Navigator
.
pushNamed
(
context
,
'/next'
);
},
...
...
@@ -79,20 +78,20 @@ void main() {
Offset
bottomLeft
=
tester
.
getBottomLeft
(
find
.
text
(
'hello, world'
));
Offset
bottomRight
=
tester
.
getBottomRight
(
find
.
text
(
'hello, world'
));
expect
(
topLeft
,
const
Offset
(
392.0
,
347
.5
));
expect
(
topRight
,
const
Offset
(
596.0
,
347
.5
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
3
64
.5
));
expect
(
bottomRight
,
const
Offset
(
596.0
,
3
64
.5
));
expect
(
topLeft
,
const
Offset
(
392.0
,
299
.5
));
expect
(
topRight
,
const
Offset
(
596.0
,
299
.5
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
3
16
.5
));
expect
(
bottomRight
,
const
Offset
(
596.0
,
3
16
.5
));
topLeft
=
tester
.
getTopLeft
(
find
.
text
(
'你好,世界'
));
topRight
=
tester
.
getTopRight
(
find
.
text
(
'你好,世界'
));
bottomLeft
=
tester
.
getBottomLeft
(
find
.
text
(
'你好,世界'
));
bottomRight
=
tester
.
getBottomRight
(
find
.
text
(
'你好,世界'
));
expect
(
topLeft
,
const
Offset
(
392.0
,
3
95
.5
));
expect
(
topRight
,
const
Offset
(
477.0
,
3
95
.5
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
412
.5
));
expect
(
bottomRight
,
const
Offset
(
477.0
,
412
.5
));
expect
(
topLeft
,
const
Offset
(
392.0
,
3
47
.5
));
expect
(
topRight
,
const
Offset
(
477.0
,
3
47
.5
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
364
.5
));
expect
(
bottomRight
,
const
Offset
(
477.0
,
364
.5
));
});
testWidgets
(
'Text baseline with EN locale'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -125,7 +124,6 @@ void main() {
key:
targetKey
,
builder:
(
BuildContext
context
)
{
return
PopupMenuButton
<
int
>(
placement:
PopupMenuPlacement
.
belowButton
,
onSelected:
(
int
value
)
{
Navigator
.
pushNamed
(
context
,
'/next'
);
},
...
...
@@ -166,19 +164,19 @@ void main() {
Offset
bottomLeft
=
tester
.
getBottomLeft
(
find
.
text
(
'hello, world'
));
Offset
bottomRight
=
tester
.
getBottomRight
(
find
.
text
(
'hello, world'
));
expect
(
topLeft
,
const
Offset
(
392.0
,
3
48
.0
));
expect
(
topRight
,
const
Offset
(
584.0
,
3
48
.0
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
3
64
));
expect
(
bottomRight
,
const
Offset
(
584.0
,
3
64
));
expect
(
topLeft
,
const
Offset
(
392.0
,
3
00
.0
));
expect
(
topRight
,
const
Offset
(
584.0
,
3
00
.0
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
3
16
));
expect
(
bottomRight
,
const
Offset
(
584.0
,
3
16
));
topLeft
=
tester
.
getTopLeft
(
find
.
text
(
'你好,世界'
));
topRight
=
tester
.
getTopRight
(
find
.
text
(
'你好,世界'
));
bottomLeft
=
tester
.
getBottomLeft
(
find
.
text
(
'你好,世界'
));
bottomRight
=
tester
.
getBottomRight
(
find
.
text
(
'你好,世界'
));
expect
(
topLeft
,
const
Offset
(
392.0
,
3
96
.0
));
expect
(
topRight
,
const
Offset
(
472.0
,
3
96
.0
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
412
.0
));
expect
(
bottomRight
,
const
Offset
(
472.0
,
412
.0
));
expect
(
topLeft
,
const
Offset
(
392.0
,
3
48
.0
));
expect
(
topRight
,
const
Offset
(
472.0
,
3
48
.0
));
expect
(
bottomLeft
,
const
Offset
(
392.0
,
364
.0
));
expect
(
bottomRight
,
const
Offset
(
472.0
,
364
.0
));
});
}
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