Unverified Commit ea777fea authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Skip Audit - Rendering Library (#58640)

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