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
1b77fca7
Unverified
Commit
1b77fca7
authored
Aug 03, 2021
by
Darren Austin
Committed by
GitHub
Aug 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated skipped tests for painting directory. (#87546)
parent
fb6a8165
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
44 deletions
+42
-44
decoration_test.dart
packages/flutter/test/painting/decoration_test.dart
+2
-2
gradient_test.dart
packages/flutter/test/painting/gradient_test.dart
+2
-2
image_cache_test.dart
packages/flutter/test/painting/image_cache_test.dart
+2
-2
image_provider_network_image_test.dart
...tter/test/painting/image_provider_network_image_test.dart
+4
-4
shader_warm_up_test.dart
packages/flutter/test/painting/shader_warm_up_test.dart
+1
-1
text_painter_rtl_test.dart
packages/flutter/test/painting/text_painter_rtl_test.dart
+27
-29
text_painter_test.dart
packages/flutter/test/painting/text_painter_test.dart
+4
-4
No files found.
packages/flutter/test/painting/decoration_test.dart
View file @
1b77fca7
...
...
@@ -360,7 +360,7 @@ void main() {
' The ImageConfiguration was:
\n
'
' ImageConfiguration(size: Size(100.0, 100.0))
\n
'
,
);
},
skip:
kIsWeb
);
},
skip:
kIsWeb
);
// https://github.com/flutter/flutter/issues/87364
test
(
'DecorationImage - error listener'
,
()
async
{
late
String
exception
;
...
...
@@ -707,5 +707,5 @@ void main() {
expect
(
info
.
image
.
debugGetOpenHandleStackTraces
()!.
length
,
baselineRefCount
);
info
.
dispose
();
},
skip:
kIsWeb
);
},
skip:
kIsWeb
);
// https://github.com/flutter/flutter/issues/87442
}
packages/flutter/test/painting/gradient_test.dart
View file @
1b77fca7
...
...
@@ -816,7 +816,7 @@ void main() {
for
(
final
Gradient
gradient
in
gradients45
)
{
testWidgets
(
'
$gradient
'
,
(
WidgetTester
tester
)
async
{
await
runTest
(
tester
,
gradient
,
45
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/41389
}
);
}
});
...
...
@@ -824,7 +824,7 @@ void main() {
for
(
final
Gradient
gradient
in
gradients90
)
{
testWidgets
(
'
$gradient
'
,
(
WidgetTester
tester
)
async
{
await
runTest
(
tester
,
gradient
,
90
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/41389
}
);
}
});
});
...
...
packages/flutter/test/painting/image_cache_test.dart
View file @
1b77fca7
...
...
@@ -536,7 +536,7 @@ void main() {
imageInfo
.
dispose
();
expect
(
testImage
.
debugGetOpenHandleStackTraces
()!.
length
,
0
);
},
skip:
kIsWeb
);
//
Web does not care about image handles.
},
skip:
kIsWeb
);
//
https://github.com/flutter/flutter/issues/87442
test
(
'Image is obtained and disposed of properly for cache when listener is still active'
,
()
async
{
const
int
key
=
1
;
...
...
@@ -575,5 +575,5 @@ void main() {
expect
(
testImage
.
debugGetOpenHandleStackTraces
()!.
length
,
1
);
imageInfo
.
dispose
();
expect
(
testImage
.
debugGetOpenHandleStackTraces
()!.
length
,
0
);
},
skip:
kIsWeb
);
//
Web does not care about open image handles.
},
skip:
kIsWeb
);
//
https://github.com/flutter/flutter/issues/87442
}
packages/flutter/test/painting/image_provider_network_image_test.dart
View file @
1b77fca7
...
...
@@ -69,7 +69,7 @@ void main() {
.
having
((
NetworkImageLoadException
e
)
=>
e
.
uri
,
'uri'
,
Uri
.
base
.
resolve
(
requestUrl
)),
);
expect
(
httpClient
.
request
.
response
.
drained
,
true
);
},
skip:
isBrowser
);
// Browser implementation does not use HTTP client but an <img> tag.
},
skip:
isBrowser
);
//
[intended]
Browser implementation does not use HTTP client but an <img> tag.
test
(
'Uses the HttpClient provided by debugNetworkImageHttpClientProvider if set'
,
()
async
{
httpClient
.
thrownError
=
'client1'
;
...
...
@@ -94,7 +94,7 @@ void main() {
debugNetworkImageHttpClientProvider
=
()
=>
client2
;
await
loadNetworkImage
();
expect
(
capturedErrors
,
<
dynamic
>[
'client1'
,
'client2'
]);
},
skip:
isBrowser
);
// Browser implementation does not use HTTP client but an <img> tag.
},
skip:
isBrowser
);
//
[intended]
Browser implementation does not use HTTP client but an <img> tag.
test
(
'Propagates http client errors during resolve()'
,
()
async
{
httpClient
.
thrownError
=
Error
();
...
...
@@ -155,7 +155,7 @@ void main() {
expect
(
events
[
i
].
cumulativeBytesLoaded
,
math
.
min
((
i
+
1
)
*
chunkSize
,
kTransparentImage
.
length
));
expect
(
events
[
i
].
expectedTotalBytes
,
kTransparentImage
.
length
);
}
},
skip:
isBrowser
);
// Browser loads images through <img> not Http.
},
skip:
isBrowser
);
//
[intended]
Browser loads images through <img> not Http.
test
(
'NetworkImage is evicted from cache on SocketException'
,
()
async
{
final
_FakeHttpClient
mockHttpClient
=
_FakeHttpClient
();
...
...
@@ -187,7 +187,7 @@ void main() {
expect
(
imageCache
!.
containsKey
(
result
),
isFalse
);
debugNetworkImageHttpClientProvider
=
null
;
},
skip:
isBrowser
);
// Browser does not resolve images this way.
},
skip:
isBrowser
);
//
[intended]
Browser does not resolve images this way.
Future
<
Codec
>
_decoder
(
Uint8List
bytes
,
{
int
?
cacheWidth
,
int
?
cacheHeight
,
bool
?
allowUpscaling
})
async
{
return
FakeCodec
();
...
...
packages/flutter/test/painting/shader_warm_up_test.dart
View file @
1b77fca7
...
...
@@ -57,5 +57,5 @@ void main() {
throwsA
(
isA
<
String
>().
having
((
String
message
)
=>
message
,
'message'
,
'Object has been disposed.'
)),
);
expect
(
capturedImage
.
debugDisposed
,
true
);
},
skip:
kIsWeb
);
// Browser doesn't support approximateBytesUsed and doesn't rasterize the picture at this time.
},
skip:
kIsWeb
);
//
[intended]
Browser doesn't support approximateBytesUsed and doesn't rasterize the picture at this time.
}
packages/flutter/test/painting/text_painter_rtl_test.dart
View file @
1b77fca7
...
...
@@ -51,9 +51,9 @@ void main() {
// to be part of the word sometimes and not others, which is fine, but we'd mildly prefer if
// we were consistently considering them part of words always.
final
TextRange
hebrew1
=
painter
.
getWordBoundary
(
const
TextPosition
(
offset:
4
,
affinity:
TextAffinity
.
downstream
));
expect
(
hebrew1
,
const
TextRange
(
start:
0
,
end:
8
),
skip:
skipExpectsWithKnownBugs
);
expect
(
hebrew1
,
const
TextRange
(
start:
0
,
end:
8
),
skip:
skipExpectsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
final
TextRange
english2
=
painter
.
getWordBoundary
(
const
TextPosition
(
offset:
14
,
affinity:
TextAffinity
.
downstream
));
expect
(
english2
,
const
TextRange
(
start:
9
,
end:
19
),
skip:
skipExpectsWithKnownBugs
);
expect
(
english2
,
const
TextRange
(
start:
9
,
end:
19
),
skip:
skipExpectsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
final
TextRange
hebrew3
=
painter
.
getWordBoundary
(
const
TextPosition
(
offset:
24
,
affinity:
TextAffinity
.
downstream
));
expect
(
hebrew3
,
const
TextRange
(
start:
20
,
end:
28
));
...
...
@@ -163,8 +163,8 @@ void main() {
<
TextBox
>[],
// U+202C, non-printing Unicode bidi formatting character
// The list currently has one extra bogus entry (the last entry, for the
// trailing U+202C PDF, should be empty but is one-pixel-wide instead).
],
skip:
skipExpectsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
],
skip:
skipExpectsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - bidi overrides in RTL'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -180,9 +180,9 @@ void main() {
painter
.
layout
();
final
TextRange
hebrew1
=
painter
.
getWordBoundary
(
const
TextPosition
(
offset:
4
,
affinity:
TextAffinity
.
downstream
));
expect
(
hebrew1
,
const
TextRange
(
start:
0
,
end:
8
),
skip:
skipExpectsWithKnownBugs
);
expect
(
hebrew1
,
const
TextRange
(
start:
0
,
end:
8
),
skip:
skipExpectsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
final
TextRange
english2
=
painter
.
getWordBoundary
(
const
TextPosition
(
offset:
14
,
affinity:
TextAffinity
.
downstream
));
expect
(
english2
,
const
TextRange
(
start:
9
,
end:
19
),
skip:
skipExpectsWithKnownBugs
);
expect
(
english2
,
const
TextRange
(
start:
9
,
end:
19
),
skip:
skipExpectsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
final
TextRange
hebrew3
=
painter
.
getWordBoundary
(
const
TextPosition
(
offset:
24
,
affinity:
TextAffinity
.
downstream
));
expect
(
hebrew3
,
const
TextRange
(
start:
20
,
end:
28
));
...
...
@@ -253,9 +253,9 @@ void main() {
],
// Horizontal offsets are currently one pixel off in places; vertical offsets are good.
// The list is currently in the wrong order (so selection boxes will paint in the wrong order).
skip:
skipExpectsWithKnownBugs
,
skip:
skipExpectsWithKnownBugs
,
// https://github.com/flutter/flutter/issues/87536
);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - forced line-wrapping with bidi'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -353,9 +353,10 @@ void main() {
TextBox
.
fromLTRBD
(
0.0
,
20.0
,
60.0
,
40.0
,
TextDirection
.
ltr
),
TextBox
.
fromLTRBD
(
60.0
,
28.0
,
110.0
,
38.0
,
TextDirection
.
ltr
),
],
skip:
skipExpectsWithKnownBugs
,
// horizontal offsets are one pixel off in places; vertical offsets are good
// horizontal offsets are one pixel off in places; vertical offsets are good
skip:
skipExpectsWithKnownBugs
,
// https://github.com/flutter/flutter/issues/87536
);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - line wrap mid-word, bidi - LTR base'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -386,7 +387,8 @@ void main() {
TextBox
.
fromLTRBD
(
0.0
,
20.0
,
40.0
,
40.0
,
TextDirection
.
rtl
),
TextBox
.
fromLTRBD
(
40.0
,
28.0
,
90.0
,
38.0
,
TextDirection
.
ltr
),
],
skip:
skipExpectsWithKnownBugs
,
// horizontal offsets are one pixel off in places; vertical offsets are good
// horizontal offsets are one pixel off in places; vertical offsets are good
skip:
skipExpectsWithKnownBugs
,
// https://github.com/flutter/flutter/issues/87536
);
final
List
<
List
<
TextBox
>>
list
=
<
List
<
TextBox
>>[
...
...
@@ -410,7 +412,7 @@ void main() {
<
TextBox
>[
TextBox
.
fromLTRBD
(
70.0
,
28.0
,
80.0
,
38.0
,
TextDirection
.
ltr
)],
<
TextBox
>[
TextBox
.
fromLTRBD
(
80.0
,
28.0
,
90.0
,
38.0
,
TextDirection
.
ltr
)],
]);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - line wrap mid-word, bidi - RTL base'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -443,9 +445,9 @@ void main() {
],
// Horizontal offsets are currently one pixel off in places; vertical offsets are good.
// The list is currently in the wrong order (so selection boxes will paint in the wrong order).
skip:
skipExpectsWithKnownBugs
,
skip:
skipExpectsWithKnownBugs
,
// https://github.com/flutter/flutter/issues/87536
);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - multiple levels'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -474,9 +476,9 @@ void main() {
// Horizontal offsets are currently one pixel off in places; vertical offsets are good.
// The list is currently in the wrong order (so selection boxes will paint in the wrong order).
// Also currently there's an extraneous box at the start of the list.
skip:
skipExpectsWithKnownBugs
,
skip:
skipExpectsWithKnownBugs
,
// https://github.com/flutter/flutter/issues/87536
);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - getPositionForOffset - RTL in LTR'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -518,7 +520,8 @@ void main() {
// ^
painter
.
getPositionForOffset
(
const
Offset
(
12.0
,
5.0
)).
toString
(),
const
TextPosition
(
offset:
1
,
affinity:
TextAffinity
.
downstream
).
toString
(),
skip:
skipExpectsWithKnownBugs
,
// currently we say upstream instead of downstream
// currently we say upstream instead of downstream
skip:
skipExpectsWithKnownBugs
,
// https://github.com/flutter/flutter/issues/87536
);
expect
(
// Aaa Bbb Ccc Gimel Bet Alef Ddd Eee Fff
...
...
@@ -558,7 +561,7 @@ void main() {
painter
.
getPositionForOffset
(
const
Offset
(
100.0
,
5.0
)).
toString
(),
const
TextPosition
(
offset:
9
,
affinity:
TextAffinity
.
upstream
).
toString
(),
);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - getPositionForOffset - LTR in RTL'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -603,7 +606,7 @@ void main() {
painter
.
getPositionForOffset
(
const
Offset
(
62.0
,
5.0
)).
toString
(),
const
TextPosition
(
offset:
3
,
affinity:
TextAffinity
.
upstream
).
toString
(),
);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - Spaces'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -651,7 +654,7 @@ void main() {
expect
(
painter
.
width
,
410.0
);
expect
(
painter
.
height
,
200.0
);
expect
(
painter
.
computeDistanceToActualBaseline
(
TextBaseline
.
alphabetic
),
160.0
);
expect
(
painter
.
computeDistanceToActualBaseline
(
TextBaseline
.
alphabetic
),
moreOrLessEquals
(
160.0
,
epsilon:
0.001
)
);
expect
(
painter
.
preferredLineHeight
,
100.0
);
expect
(
...
...
@@ -662,9 +665,9 @@ void main() {
TextBox
.
fromLTRBD
(
110.0
,
0.0
,
310.0
,
200.0
,
TextDirection
.
ltr
),
],
// Horizontal offsets are currently one pixel off in places; vertical offsets are good.
skip:
skipExpectsWithKnownBugs
,
skip:
skipExpectsWithKnownBugs
,
// https://github.com/flutter/flutter/issues/87536
);
},
skip:
skipTestsWithKnownBugs
);
},
skip:
skipTestsWithKnownBugs
);
// https://github.com/flutter/flutter/issues/87536
test
(
'TextPainter - empty text baseline'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -674,14 +677,9 @@ void main() {
style:
TextStyle
(
fontFamily:
'Ahem'
,
fontSize:
100.0
,
height:
1.0
),
);
painter
.
layout
();
expect
(
// Returns -1
painter
.
computeDistanceToActualBaseline
(
TextBaseline
.
alphabetic
),
80.0
,
skip:
skipExpectsWithKnownBugs
,
);
},
skip:
skipTestsWithKnownBugs
);
expect
(
painter
.
computeDistanceToActualBaseline
(
TextBaseline
.
alphabetic
),
moreOrLessEquals
(
80.0
,
epsilon:
0.001
));
});
}
String
lro
(
String
s
)
=>
'
${Unicode.LRO}
L
${s}
L
${Unicode.PDF}
'
;
String
rlo
(
String
s
)
=>
'
${Unicode.RLO}
R
${s}
R
${Unicode.PDF}
'
;
packages/flutter/test/painting/text_painter_test.dart
View file @
1b77fca7
...
...
@@ -746,7 +746,7 @@ void main() {
expect
(
painter
.
inlinePlaceholderBoxes
![
11
],
const
TextBox
.
fromLTRBD
(
250
,
30
,
300
,
60
,
TextDirection
.
ltr
));
expect
(
painter
.
inlinePlaceholderBoxes
![
12
],
const
TextBox
.
fromLTRBD
(
300
,
30
,
351
,
60
,
TextDirection
.
ltr
));
expect
(
painter
.
inlinePlaceholderBoxes
![
13
],
const
TextBox
.
fromLTRBD
(
351
,
30
,
401
,
60
,
TextDirection
.
ltr
));
},
skip:
isBrowser
&&
!
isCanvasKit
);
// https://github.com/flutter/flutter/issues/
42086
},
skip:
isBrowser
&&
!
isCanvasKit
);
// https://github.com/flutter/flutter/issues/
87540
// Null values are valid. See https://github.com/flutter/flutter/pull/48346#issuecomment-584839221
test
(
'TextPainter set TextHeightBehavior null test'
,
()
{
...
...
@@ -955,7 +955,7 @@ void main() {
).
first
.
toRect
();
expect
(
glyphBox
,
newGlyphBox
);
});
},
skip:
isBrowser
&&
!
isCanvasKit
);
},
skip:
isBrowser
&&
!
isCanvasKit
);
// https://github.com/flutter/flutter/issues/87543
test
(
'TextPainter handles invalid UTF-16'
,
()
{
Object
?
exception
;
...
...
@@ -973,7 +973,7 @@ void main() {
// The layout should include one replacement character.
expect
(
painter
.
width
,
equals
(
fontSize
));
expect
(
exception
,
isNotNull
);
},
skip:
kIsWeb
);
},
skip:
kIsWeb
);
// https://github.com/flutter/flutter/issues/87544
test
(
'Diacritic'
,
()
{
final
TextPainter
painter
=
TextPainter
()
...
...
@@ -989,7 +989,7 @@ void main() {
offset:
text
.
length
,
affinity:
TextAffinity
.
upstream
),
ui
.
Rect
.
zero
);
expect
(
caretOffset
.
dx
,
painter
.
width
);
},
skip:
kIsWeb
&&
!
isCanvasKit
);
},
skip:
kIsWeb
&&
!
isCanvasKit
);
// https://github.com/flutter/flutter/issues/87545
}
class
MockCanvas
extends
Fake
implements
Canvas
{
...
...
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