Skip Audit - Rendering Library (#58640)
This commit is contained in:
@@ -111,7 +111,7 @@ void main() {
|
||||
' ╚═══════════\n'
|
||||
),
|
||||
);
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
|
||||
// Test that clipping will be used even when the text fits within the visible
|
||||
// region if the start position of the text is offset (e.g. during scrolling
|
||||
@@ -214,7 +214,7 @@ void main() {
|
||||
pumpFrame();
|
||||
|
||||
expect(editable, paintsExactlyCountTimes(#drawRRect, 0));
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
|
||||
test('Can change textAlign', () {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -313,7 +313,7 @@ void main() {
|
||||
pumpFrame();
|
||||
|
||||
expect(editable, paintsExactlyCountTimes(#drawRRect, 0));
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61024
|
||||
|
||||
test('text is painted above selection', () {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -403,7 +403,7 @@ void main() {
|
||||
..paragraph(),
|
||||
);
|
||||
expect(editable, paintsExactlyCountTimes(#drawRect, 1));
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
|
||||
test('ignore key event from web platform', () async {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -540,7 +540,7 @@ void main() {
|
||||
expect(currentSelection.isCollapsed, false);
|
||||
expect(currentSelection.baseOffset, 5);
|
||||
expect(currentSelection.extentOffset, 9);
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61026
|
||||
|
||||
test('selects correct place when offsets are flipped', () {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -574,7 +574,7 @@ void main() {
|
||||
expect(currentSelection.isCollapsed, isFalse);
|
||||
expect(currentSelection.baseOffset, 1);
|
||||
expect(currentSelection.extentOffset, 3);
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
|
||||
test('selection does not flicker as user is dragging', () {
|
||||
int selectionChangedCount = 0;
|
||||
@@ -633,7 +633,7 @@ void main() {
|
||||
expect(updatedSelection.baseOffset, 3);
|
||||
expect(updatedSelection.extentOffset, 5);
|
||||
expect(selectionChangedCount, 1);
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61028
|
||||
|
||||
test('promptRect disappears when promptRectColor is set to null', () {
|
||||
const Color promptRectColor = Color(0x12345678);
|
||||
@@ -737,7 +737,7 @@ void main() {
|
||||
|
||||
editable.layout(BoxConstraints.loose(const Size(1000.0, 1000.0)));
|
||||
expect(editable.maxScrollExtent, equals(10));
|
||||
}, skip: isBrowser); // TODO(yjbanov): https://github.com/flutter/flutter/issues/42772
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/42772
|
||||
|
||||
test('arrow keys and delete handle simple text correctly', () async {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -786,7 +786,7 @@ void main() {
|
||||
await simulateKeyDownEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
await simulateKeyUpEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
expect(delegate.textEditingValue.text, 'est');
|
||||
}, skip: kIsWeb);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61021
|
||||
|
||||
test('arrow keys and delete handle surrogate pairs correctly', () async {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -836,7 +836,7 @@ void main() {
|
||||
await simulateKeyDownEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
await simulateKeyUpEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
expect(delegate.textEditingValue.text, '01236789');
|
||||
}, skip: kIsWeb);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61021
|
||||
|
||||
test('arrow keys and delete handle grapheme clusters correctly', () async {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -886,7 +886,7 @@ void main() {
|
||||
await simulateKeyDownEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
await simulateKeyUpEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
expect(delegate.textEditingValue.text, '01232345');
|
||||
}, skip: kIsWeb);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61021
|
||||
|
||||
test('arrow keys and delete handle surrogate pairs correctly', () async {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
@@ -935,7 +935,7 @@ void main() {
|
||||
await simulateKeyDownEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
await simulateKeyUpEvent(LogicalKeyboardKey.delete, platform: 'android');
|
||||
expect(delegate.textEditingValue.text, '');
|
||||
}, skip: kIsWeb); // Key simulation doesn't work on web.
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61021
|
||||
|
||||
test('getEndpointsForSelection handles empty characters', () {
|
||||
final TextSelectionDelegate delegate = FakeEditableTextState();
|
||||
|
||||
@@ -451,7 +451,7 @@ void main() {
|
||||
shadowColor: const Color(0x00000000),
|
||||
);
|
||||
_testConflicts(layerA, layerB, expectedErrorCount: 1);
|
||||
});
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44572
|
||||
|
||||
// Tests:
|
||||
//
|
||||
@@ -497,7 +497,7 @@ void main() {
|
||||
shadowColor: const Color(0x00000000),
|
||||
);
|
||||
_testConflicts(layerA, layerB, expectedErrorCount: 0);
|
||||
});
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44572
|
||||
|
||||
// Tests:
|
||||
//
|
||||
@@ -529,7 +529,7 @@ void main() {
|
||||
shadowColor: const Color(0x00000000),
|
||||
);
|
||||
_testConflicts(layerA, layerB, expectedErrorCount: 0);
|
||||
});
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44572
|
||||
|
||||
// Tests:
|
||||
//
|
||||
@@ -565,8 +565,8 @@ void main() {
|
||||
);
|
||||
|
||||
_testConflicts(layerA, layerB, expectedErrorCount: 1);
|
||||
});
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44572
|
||||
});
|
||||
|
||||
test('ContainerLayer.toImage can render interior layer', () {
|
||||
final OffsetLayer parent = OffsetLayer();
|
||||
|
||||
@@ -105,7 +105,6 @@ void main() {
|
||||
matchesGoldenFile('localized_fonts.text_ambient_locale.chars.png'),
|
||||
);
|
||||
},
|
||||
skip: isBrowser, // TODO(yjbanov): implement goldens on the Web: https://github.com/flutter/flutter/issues/40297
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
@@ -149,7 +148,6 @@ void main() {
|
||||
matchesGoldenFile('localized_fonts.text_explicit_locale.chars.png'),
|
||||
);
|
||||
},
|
||||
skip: isBrowser, // TODO(yjbanov): implement goldens on the Web: https://github.com/flutter/flutter/issues/40297
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ void main() {
|
||||
|
||||
final TextPosition positionBelow = paragraph.getPositionForOffset(const Offset(5.0, 20.0));
|
||||
expect(positionBelow.offset, greaterThan(position40.offset));
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61015
|
||||
|
||||
test('getBoxesForSelection control test', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -72,9 +72,7 @@ void main() {
|
||||
|
||||
expect(boxes.any((ui.TextBox box) => box.left == 250 && box.top == 0), isTrue);
|
||||
expect(boxes.any((ui.TextBox box) => box.right == 100 && box.top == 10), isTrue);
|
||||
},
|
||||
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
|
||||
skip: isLinux || isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61016
|
||||
|
||||
test('getWordBoundary control test', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -91,7 +89,7 @@ void main() {
|
||||
|
||||
final TextRange range85 = paragraph.getWordBoundary(const TextPosition(offset: 75));
|
||||
expect(range85.textInside(_kText), equals("Queen's"));
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61017
|
||||
|
||||
test('overflow test', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -167,7 +165,7 @@ void main() {
|
||||
|
||||
relayoutWith(maxLines: 100, softWrap: true, overflow: TextOverflow.fade);
|
||||
expect(paragraph.debugHasOverflowShader, isFalse);
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61018
|
||||
|
||||
test('maxLines', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -196,7 +194,7 @@ void main() {
|
||||
|
||||
layoutAt(3);
|
||||
expect(paragraph.size.height, 30.0);
|
||||
}, skip: isWindows || isBrowser); // Ahem-based tests don't yet quite work on Windows
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61018
|
||||
|
||||
test('changing color does not do layout', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -283,7 +281,7 @@ void main() {
|
||||
expect(boxes[2].toRect().height, closeTo(26.0, 0.0001));
|
||||
expect(boxes[3].toRect().width, anyOf(14.0, 13.0));
|
||||
expect(boxes[3].toRect().height, closeTo(13.0, 0.0001));
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61016
|
||||
|
||||
test('toStringDeep', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -364,8 +362,7 @@ void main() {
|
||||
expect(boxes[2], const TextBox.fromLTRBD(24.0, 0.0, 38.0, 14.0, TextDirection.ltr));
|
||||
expect(boxes[3], const TextBox.fromLTRBD(38.0, 4.0, 48.0, 14.0, TextDirection.ltr));
|
||||
expect(boxes[4], const TextBox.fromLTRBD(48.0, 0.0, 62.0, 14.0, TextDirection.ltr));
|
||||
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
|
||||
}, skip: isWindows || isMacOS || isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
|
||||
|
||||
test('inline widgets multiline test', () {
|
||||
const TextSpan text = TextSpan(
|
||||
@@ -417,8 +414,7 @@ void main() {
|
||||
// Wraps
|
||||
expect(boxes[7], const TextBox.fromLTRBD(0.0, 28.0, 14.0, 42.0, TextDirection.ltr));
|
||||
expect(boxes[8], const TextBox.fromLTRBD(14.0, 28.0, 28.0, 42.0 , TextDirection.ltr));
|
||||
// Ahem-based tests don't yet quite work on Windows or some MacOS environments
|
||||
}, skip: isWindows || isMacOS || isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
|
||||
|
||||
test('Supports gesture recognizer semantics', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -432,7 +428,7 @@ void main() {
|
||||
layout(paragraph);
|
||||
|
||||
paragraph.assembleSemanticsNode(SemanticsNode(), SemanticsConfiguration(), <SemanticsNode>[]);
|
||||
});
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
|
||||
|
||||
test('Asserts on unsupported gesture recognizer', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
@@ -451,5 +447,5 @@ void main() {
|
||||
expect(e.message, 'MultiTapGestureRecognizer is not supported.');
|
||||
}
|
||||
expect(failed, true);
|
||||
});
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
|
||||
}
|
||||
|
||||
@@ -71,5 +71,5 @@ void main() {
|
||||
|
||||
expect(positioner.size.width, equals(200.0));
|
||||
expect(positioner.size.height, equals(200.0));
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ void main() {
|
||||
expect(getPixel(20, 20), equals(0x00000080));
|
||||
expect(getPixel(image.width - 1, 0), equals(0x00000000));
|
||||
expect(getPixel(image.width - 1, 20), equals(0xffffffff));
|
||||
}, skip: isBrowser);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/42767
|
||||
|
||||
test('RenderOpacity does not composite if it is transparent', () {
|
||||
final RenderOpacity renderOpacity = RenderOpacity(
|
||||
|
||||
@@ -480,7 +480,7 @@ void main() {
|
||||
);
|
||||
expect(children.sublist(0, 21).any((RenderBox r) => r.attached), false);
|
||||
expect(children.sublist(21, 30).every((RenderBox r) => r.attached), true);
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
|
||||
test('RenderSliverGrid calculates correct geometry', () {
|
||||
// Viewport is 800x600, each grid element is 400x100, giving us space for 12 visible children
|
||||
|
||||
@@ -198,7 +198,7 @@ void main() {
|
||||
revealed = viewport.getOffsetToReveal(target, 1.0, rect: const Rect.fromLTWH(40.0, 40.0, 10.0, 10.0));
|
||||
expect(revealed.offset, 360.0);
|
||||
expect(revealed.rect, const Rect.fromLTWH(0.0, 40.0, 10.0, 10.0));
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
|
||||
testWidgets('Viewport getOffsetToReveal Sliver - down', (WidgetTester tester) async {
|
||||
final List<Widget> children = <Widget>[];
|
||||
|
||||
Reference in New Issue
Block a user