Updated skipped tests for painting directory. (#87546)
This commit is contained in:
parent
fb6a816595
commit
1b77fca735
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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.
|
||||
}
|
||||
|
@ -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}';
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user