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
522d19e2
Unverified
Commit
522d19e2
authored
Aug 06, 2020
by
Ian Hickson
Committed by
GitHub
Aug 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unskip the bidi semantics test. (#62823)
parent
209e3e9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
34 deletions
+49
-34
text_test.dart
packages/flutter/test/widgets/text_test.dart
+25
-20
platform.dart
packages/flutter_test/lib/src/platform.dart
+24
-14
No files found.
packages/flutter/test/widgets/text_test.dart
View file @
522d19e2
...
...
@@ -506,6 +506,13 @@ void main() {
);
// The expected visual order of the text is:
// hello world RIS OD you OD WOH YOB good bye
// There are five unique text areas, they are, in visual order but
// showing the logical text:
// [hello world][SIR][HOW DO you DO][BOY][good bye]
// The direction of each varies based on the first bit of that area.
// The presence of the bidi formatting characters in the text is a
// bit dubious, but that's what we do currently, and it's not really
// clear what the perfect behavior would be...
final
TestSemantics
expectedSemantics
=
TestSemantics
.
root
(
children:
<
TestSemantics
>[
TestSemantics
.
rootChild
(
...
...
@@ -513,33 +520,31 @@ void main() {
children:
<
TestSemantics
>[
TestSemantics
(
rect:
const
Rect
.
fromLTRB
(-
4.0
,
-
4.0
,
480.0
,
18.0
),
label:
'hello world '
,
textDirection:
TextDirection
.
ltr
,
// text direction is declared as LTR.
label:
'hello world
${Unicode.RLE}${Unicode.RLO}
'
,
textDirection:
TextDirection
.
ltr
,
),
TestSemantics
(
rect:
const
Rect
.
fromLTRB
(
150.0
,
-
4.0
,
200.0
,
18.0
),
label:
'RIS'
,
textDirection:
TextDirection
.
rtl
,
// in the last string we switched to RTL using RLE.
actions:
<
SemanticsAction
>[
SemanticsAction
.
tap
],
flags:
<
SemanticsFlag
>[
SemanticsFlag
.
isLink
],
rect:
const
Rect
.
fromLTRB
(
416.0
,
-
4.0
,
466.0
,
18.0
),
label:
'BOY'
,
textDirection:
TextDirection
.
rtl
,
actions:
<
SemanticsAction
>[
SemanticsAction
.
longPress
],
),
TestSemantics
(
rect:
const
Rect
.
fromLTRB
(
192.0
,
-
4.0
,
424.0
,
18.0
),
label:
'
OD you OD WOH '
,
// Still RTL.
label:
'
HOW DO
${Unicode.PDF}
you
${Unicode.RLO}
DO '
,
textDirection:
TextDirection
.
rtl
,
),
TestSemantics
(
rect:
const
Rect
.
fromLTRB
(
416.0
,
-
4.0
,
466.0
,
18.0
),
label:
'YOB'
,
textDirection:
TextDirection
.
rtl
,
// Still RTL.
actions:
<
SemanticsAction
>[
SemanticsAction
.
longPress
,
],
rect:
const
Rect
.
fromLTRB
(
150.0
,
-
4.0
,
200.0
,
18.0
),
label:
'SIR'
,
textDirection:
TextDirection
.
rtl
,
actions:
<
SemanticsAction
>[
SemanticsAction
.
tap
],
flags:
<
SemanticsFlag
>[
SemanticsFlag
.
isLink
],
),
TestSemantics
(
rect:
const
Rect
.
fromLTRB
(
472.0
,
-
4.0
,
606.0
,
18.0
),
label:
' good bye'
,
textDirection:
TextDirection
.
rtl
,
// Begin as RTL but pop to LTR.
label:
'
${Unicode.PDF}${Unicode.PDF}
good bye'
,
textDirection:
TextDirection
.
rtl
,
),
],
),
...
...
@@ -554,7 +559,7 @@ void main() {
),
);
semantics
.
dispose
();
},
skip:
true
);
// https://github.com/flutter/flutter/issues/20891
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/62945
testWidgets
(
'TapGesture recognizers contribute link semantics'
,
(
WidgetTester
tester
)
async
{
final
SemanticsTester
semantics
=
SemanticsTester
(
tester
);
...
...
packages/flutter_test/lib/src/platform.dart
View file @
522d19e2
...
...
@@ -4,16 +4,23 @@
import
'dart:io'
;
// Whether the current dart code is running in an environment that was compiled
// to JavaScript.
const
bool
_kIsCompiledToJavaScript
=
identical
(
0
,
0.0
);
/// Whether the test is running in a web browser compiled to JavaScript.
///
/// See also:
///
/// * [kIsWeb], the equivalent constant in the `foundation` library.
const
bool
isBrowser
=
identical
(
0
,
0.0
);
/// Whether the test is running on the Windows operating system.
///
/// This does not include test compiled to JavaScript running in a browser on
/// This does not include test
s
compiled to JavaScript running in a browser on
/// the Windows operating system.
///
/// See also:
///
/// * [isBrowser], which reports true for tests running in browsers.
bool
get
isWindows
{
if
(
_kIsCompiledToJavaScript
)
{
if
(
isBrowser
)
{
return
false
;
}
return
Platform
.
isWindows
;
...
...
@@ -21,10 +28,14 @@ bool get isWindows {
/// Whether the test is running on the macOS operating system.
///
/// This does not include test compiled to JavaScript running in a browser on
/// This does not include test
s
compiled to JavaScript running in a browser on
/// the macOS operating system.
///
/// See also:
///
/// * [isBrowser], which reports true for tests running in browsers.
bool
get
isMacOS
{
if
(
_kIsCompiledToJavaScript
)
{
if
(
isBrowser
)
{
return
false
;
}
return
Platform
.
isMacOS
;
...
...
@@ -32,16 +43,15 @@ bool get isMacOS {
/// Whether the test is running on the Linux operating system.
///
/// This does not include test compiled to JavaScript running in a browser on
/// This does not include test
s
compiled to JavaScript running in a browser on
/// the Linux operating system.
///
/// See also:
///
/// * [isBrowser], which reports true for tests running in browsers.
bool
get
isLinux
{
if
(
_kIsCompiledToJavaScript
)
{
if
(
isBrowser
)
{
return
false
;
}
return
Platform
.
isLinux
;
}
/// Whether the test is running in a web browser compiled to JavaScript.
bool
get
isBrowser
{
return
_kIsCompiledToJavaScript
;
}
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