Unverified Commit 225a43d9 authored by Darren Austin's avatar Darren Austin Committed by GitHub

Updated skipped tests for rendering directory. (#87700)

parent ec86605a
......@@ -65,7 +65,7 @@ void testVariants(
await variant.tearDown(value, memento);
}
},
skip: skip,
skip: skip, // [intended] just part of the API.
timeout: timeout,
tags: tags,
);
......@@ -364,11 +364,7 @@ void main() {
pumpFrame(phase: EnginePhase.compositingBits);
expect(editable, paintsExactlyCountTimes(#drawRRect, 0));
// TODO(yjbanov): ahem.ttf doesn't have Chinese glyphs, making this test
// sensitive to browser/OS when running in web mode:
// https://github.com/flutter/flutter/issues/83129
}, skip: kIsWeb);
});
test('text is painted above selection', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
......@@ -545,7 +541,7 @@ void main() {
expect(currentSelection.isCollapsed, false);
expect(currentSelection.baseOffset, 5);
expect(currentSelection.extentOffset, 9);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61026
});
test('selects readonly renderEditable matches native behavior for android', () {
// Regression test for https://github.com/flutter/flutter/issues/79166.
......@@ -878,7 +874,7 @@ void main() {
editable.layout(BoxConstraints.loose(const Size(1000.0, 1000.0)));
expect(editable.maxScrollExtent, equals(10));
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/42772
});
test('moveSelectionLeft/RightByLine stays on the current line', () async {
const String text = 'one two three\n\nfour five six';
......@@ -1321,7 +1317,7 @@ void main() {
editable.moveSelectionLeft(SelectionChangedCause.keyboard);
expect(currentSelection.isCollapsed, true);
expect(currentSelection.baseOffset, 2);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/58068
});
test('arrow keys with selection text and shift', () async {
const String text = '012345';
......@@ -1385,7 +1381,7 @@ void main() {
expect(currentSelection.isCollapsed, false);
expect(currentSelection.baseOffset, 4);
expect(currentSelection.extentOffset, 1);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/58068
});
testVariants('respects enableInteractiveSelection', () async {
const String text = '012345';
......@@ -1447,7 +1443,7 @@ void main() {
await simulateKeyUpEvent(wordModifier);
await simulateKeyUpEvent(LogicalKeyboardKey.shift);
}, skip: isBrowser, variant: KeySimulatorTransitModeVariant.all()); // https://github.com/flutter/flutter/issues/58068
}, skip: isBrowser, variant: KeySimulatorTransitModeVariant.all()); // https://github.com/flutter/flutter/issues/87681
group('delete', () {
test('when as a non-collapsed selection, it should delete a selection', () async {
......@@ -1666,7 +1662,7 @@ void main() {
expect(delegate.textEditingValue.text, 'tes');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 3);
}, skip: isBrowser);
});
test('when using cjk characters', () async {
const String text = '用多個塊測試';
......@@ -1704,7 +1700,7 @@ void main() {
expect(delegate.textEditingValue.text, '用多個測試');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 3);
}, skip: isBrowser);
});
test('when using rtl', () async {
const String text = 'برنامج أهلا بالعالم';
......@@ -1742,7 +1738,7 @@ void main() {
expect(delegate.textEditingValue.text, 'برنامج أهلا بالعال');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, text.length - 1);
}, skip: isBrowser);
});
});
group('deleteByWord', () {
......@@ -1782,7 +1778,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test h multiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 5);
}, skip: isBrowser);
});
test('when includeWhiteSpace is true, it should treat a whiteSpace as a single word', () async {
const String text = 'test with multiple blocks';
......@@ -1820,7 +1816,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test withmultiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 9);
}, skip: isBrowser);
});
test('when cursor is after a word, it should delete the whole word', () async {
const String text = 'test with multiple blocks';
......@@ -1858,9 +1854,9 @@ void main() {
expect(delegate.textEditingValue.text, 'test multiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 5);
}, skip: isBrowser);
});
test('when cursor is preceeded by white spaces, it should delete the spaces and the next word to the left', () async {
test('when cursor is preceded by white spaces, it should delete the spaces and the next word to the left', () async {
const String text = 'test with multiple blocks';
const int offset = 12;
final TextSelectionDelegate delegate = FakeEditableTextState()
......@@ -1896,9 +1892,9 @@ void main() {
expect(delegate.textEditingValue.text, 'test multiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 5);
}, skip: isBrowser);
});
test('when cursor is preceeded by tabs spaces', () async {
test('when cursor is preceded by tabs spaces', () async {
const String text = 'test with\t\t\tmultiple blocks';
const int offset = 12;
final TextSelectionDelegate delegate = FakeEditableTextState()
......@@ -1934,9 +1930,9 @@ void main() {
expect(delegate.textEditingValue.text, 'test multiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 5);
}, skip: isBrowser);
});
test('when cursor is preceeded by break line, it should delete the breaking line and the word right before it', () async {
test('when cursor is preceded by break line, it should delete the breaking line and the word right before it', () async {
const String text = 'test with\nmultiple blocks';
const int offset = 10;
final TextSelectionDelegate delegate = FakeEditableTextState()
......@@ -1972,7 +1968,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test multiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 5);
}, skip: isBrowser);
});
test('when using cjk characters', () async {
const String text = '用多個塊測試';
......@@ -2010,7 +2006,7 @@ void main() {
expect(delegate.textEditingValue.text, '用多個測試');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 3);
}, skip: isBrowser);
});
test('when using rtl', () async {
const String text = 'برنامج أهلا بالعالم';
......@@ -2048,7 +2044,7 @@ void main() {
expect(delegate.textEditingValue.text, 'برنامج أهلا ');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 12);
}, skip: isBrowser);
});
test('when input has obscured text, it should delete everything before the selection', () async {
const int offset = 21;
......@@ -2087,7 +2083,7 @@ void main() {
expect(delegate.textEditingValue.text, 'words');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 0);
}, skip: isBrowser);
});
});
group('deleteByLine', () {
......@@ -2127,7 +2123,7 @@ void main() {
expect(delegate.textEditingValue.text, '');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 0);
}, skip: isBrowser);
});
test('when cursor is on the middle of a word, it should delete delete everything to the left', () async {
const String text = 'test with multiple blocks';
......@@ -2165,7 +2161,7 @@ void main() {
expect(delegate.textEditingValue.text, 'h multiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 0);
}, skip: isBrowser);
});
test('when previous character is a breakline, it should preserve it', () async {
const String text = 'test with\nmultiple blocks';
......@@ -2203,7 +2199,7 @@ void main() {
expect(delegate.textEditingValue.text, text);
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when text is multiline, it should delete until the first line break it finds', () async {
const String text = 'test with\n\nMore stuff right here.\nmultiple blocks';
......@@ -2241,7 +2237,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test with\n\nright here.\nmultiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 11);
}, skip: isBrowser);
});
test('when input has obscured text, it should delete everything before the selection', () async {
const int offset = 21;
......@@ -2280,7 +2276,7 @@ void main() {
expect(delegate.textEditingValue.text, 'words');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 0);
}, skip: isBrowser);
});
});
group('deleteForward', () {
......@@ -2356,7 +2352,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test withmultiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 9);
}, skip: isBrowser);
});
test('when at the end of a text, it should be a no-op', () async {
final TextSelectionDelegate delegate = FakeEditableTextState()
......@@ -2430,7 +2426,7 @@ void main() {
expect(delegate.textEditingValue.text, 'est');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 0);
}, skip: isBrowser);
});
test('when using cjk characters', () async {
const String text = '用多個塊測試';
......@@ -2468,7 +2464,7 @@ void main() {
expect(delegate.textEditingValue.text, '多個塊測試');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 0);
}, skip: isBrowser);
});
test('when using rtl', () async {
const String text = 'برنامج أهلا بالعالم';
......@@ -2506,7 +2502,7 @@ void main() {
expect(delegate.textEditingValue.text, 'رنامج أهلا بالعالم');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, 0);
}, skip: isBrowser);
});
});
......@@ -2547,7 +2543,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test w multiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when cursor is before a word, it should delete the whole word', () async {
const String text = 'test with multiple blocks';
......@@ -2585,9 +2581,9 @@ void main() {
expect(delegate.textEditingValue.text, 'test with blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when cursor is preceeded by white spaces, it should delete the spaces and the next word', () async {
test('when cursor is preceded by white spaces, it should delete the spaces and the next word', () async {
const String text = 'test with multiple blocks';
const int offset = 9;
final TextSelectionDelegate delegate = FakeEditableTextState()
......@@ -2623,7 +2619,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test with blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when cursor is before tabs, it should delete the tabs and the next word', () async {
const String text = 'test with\t\t\tmultiple blocks';
......@@ -2661,7 +2657,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test with blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when cursor is followed by break line, it should delete the next word', () async {
const String text = 'test with\n\n\nmultiple blocks';
......@@ -2699,7 +2695,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test with blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when using cjk characters', () async {
const String text = '用多個塊測試';
......@@ -2737,7 +2733,7 @@ void main() {
expect(delegate.textEditingValue.text, '多個塊測試');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when using rtl', () async {
const String text = 'برنامج أهلا بالعالم';
......@@ -2775,7 +2771,7 @@ void main() {
expect(delegate.textEditingValue.text, ' أهلا بالعالم');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when input has obscured text, it should delete everything after the selection', () async {
const int offset = 4;
......@@ -2814,7 +2810,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
});
group('deleteForwardByLine', () {
......@@ -2854,7 +2850,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when cursor is on the middle of a word, it should delete delete everything that follows', () async {
const String text = 'test with multiple blocks';
......@@ -2892,7 +2888,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test wit');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when next character is a breakline, it should preserve it', () async {
const String text = 'test with\n\n\nmultiple blocks';
......@@ -2930,7 +2926,7 @@ void main() {
expect(delegate.textEditingValue.text, text);
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
test('when text is multiline, it should delete until the first line break it finds', () async {
const String text = 'test with\n\nMore stuff right here.\nmultiple blocks';
......@@ -2968,7 +2964,7 @@ void main() {
expect(delegate.textEditingValue.text, 'te\n\nMore stuff right here.\nmultiple blocks');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/87685
test('when input has obscured text, it should delete everything after the selection', () async {
const int offset = 4;
......@@ -3007,7 +3003,7 @@ void main() {
expect(delegate.textEditingValue.text, 'test');
expect(delegate.textEditingValue.selection.isCollapsed, true);
expect(delegate.textEditingValue.selection.baseOffset, offset);
}, skip: isBrowser);
});
});
test('getEndpointsForSelection handles empty characters', () {
......@@ -3128,7 +3124,7 @@ void main() {
// Since the range covers an entire line, the Rect should also be almost
// as wide as the entire paragraph (give or take 1 character).
expect(composingRect.width, greaterThan(200 - 10));
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/66089
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/87696
});
group('previousCharacter', () {
......@@ -3896,7 +3892,7 @@ void main() {
pumpFrame();
expect(maxIntrinsicWidth, 278);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
});
test('hits correct WidgetSpan when not scrolled', () {
final TextSelectionDelegate delegate = FakeEditableTextState()
......
......@@ -24,7 +24,7 @@ void main() {
binding.handleDrawFrame();
await expectLater(completer.future, completes);
}, skip: !kIsWeb);
}, skip: !kIsWeb); // [intended] the test is only makes sense on the web.
}
class TestRenderBinding extends BindingBase
......
......@@ -189,7 +189,7 @@ Future<void> main() async {
image.dispose();
expect(image.debugGetOpenHandleStackTraces()!.length, 0);
}, skip: kIsWeb); // Web doesn't track open image handles.
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/87442
test('RenderImage does not dispose its image if setting the same image twice', () async {
final ui.Image image = await createTestImage(width: 10, height: 10, cache: false);
......@@ -206,7 +206,7 @@ Future<void> main() async {
image.dispose();
expect(image.debugGetOpenHandleStackTraces()!.length, 0);
}, skip: kIsWeb); // Web doesn't track open image handles.
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/87442
test('Render image disposes its image when it is disposed', () async {
final ui.Image image = await createTestImage(width: 10, height: 10, cache: false);
......@@ -221,5 +221,5 @@ Future<void> main() async {
image.dispose();
expect(image.debugGetOpenHandleStackTraces()!.length, 0);
}, skip: kIsWeb); // Web doesn't track open image handles.
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/87442
}
......@@ -434,7 +434,7 @@ void main() {
// Ensure we can render the same scene again after rendering an interior
// layer.
parent.buildScene(SceneBuilder());
}, skip: isBrowser); // TODO(yjbanov): `toImage` doesn't work on the Web: https://github.com/flutter/flutter/issues/42767
}, skip: isBrowser); // TODO(yjbanov): `toImage` doesn't work on the Web: https://github.com/flutter/flutter/issues/49857
test('PictureLayer does not let you call dispose unless refcount is 0', () {
PictureLayer layer = PictureLayer(Rect.zero);
......
......@@ -118,7 +118,7 @@ void main() {
final TextPosition positionBelow = paragraph.getPositionForOffset(const Offset(5.0, 20.0));
expect(positionBelow.offset, greaterThan(position40.offset));
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61015
});
test('getBoxesForSelection control test', () {
final RenderParagraph paragraph = RenderParagraph(
......@@ -184,7 +184,7 @@ void main() {
expect(boxes[2], const TextBox.fromLTRBD(0.0, 10.0, 130.0, 20.0, TextDirection.ltr));
// 'fifth':
expect(boxes[3], const TextBox.fromLTRBD(0.0, 20.0, 50.0, 30.0, TextDirection.ltr));
}, skip: !isLinux); // mac typography values can differ
}, skip: !isLinux); // mac typography values can differ https://github.com/flutter/flutter/issues/12357
test('getBoxesForSelection test with boxHeightStyle and boxWidthStyle set to max', () {
final RenderParagraph paragraph = RenderParagraph(
......@@ -243,7 +243,7 @@ void main() {
final TextRange range85 = paragraph.getWordBoundary(const TextPosition(offset: 75));
expect(range85.textInside(_kText), equals("Queen's"));
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61017
});
test('overflow test', () {
final RenderParagraph paragraph = RenderParagraph(
......@@ -439,7 +439,7 @@ void main() {
expect(boxes[2].toRect().height, moreOrLessEquals(26.0, epsilon: 0.0001));
expect(boxes[3].toRect().width, anyOf(14.0, 13.0));
expect(boxes[3].toRect().height, moreOrLessEquals(13.0, epsilon: 0.0001));
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61016
});
test('toStringDeep', () {
final RenderParagraph paragraph = RenderParagraph(
......@@ -605,7 +605,7 @@ void main() {
// intrinsicHeight = singleLineHeight * textScaleFactor * two lines.
expect(maxIntrinsicHeight, singleLineHeight * 2.0 * 2);
expect(maxIntrinsicHeight, minIntrinsicHeight);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
});
test('can compute IntrinsicWidth for widget span', () {
// Regression test for https://github.com/flutter/flutter/issues/59316
......@@ -648,7 +648,7 @@ void main() {
final double maxIntrinsicWidth = paragraph.computeMaxIntrinsicWidth(fixedHeight);
// maxIntrinsicWidth = widthForOneLine * textScaleFactor
expect(maxIntrinsicWidth, widthForOneLine * 2.0);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
});
test('inline widgets multiline test', () {
const TextSpan text = TextSpan(
......@@ -714,7 +714,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(
......@@ -733,7 +733,7 @@ void main() {
expect(e.message, 'MultiTapGestureRecognizer is not supported.');
}
expect(failed, true);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
});
test('assembleSemanticsNode handles text spans that do not yield selection boxes', () {
final RenderParagraph paragraph = RenderParagraphWithEmptySelectionBoxList(
......@@ -750,7 +750,7 @@ void main() {
final SemanticsNode node = SemanticsNode();
paragraph.assembleSemanticsNode(node, SemanticsConfiguration(), <SemanticsNode>[]);
expect(node.childrenCount, 2);
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/61020
});
test('assembleSemanticsNode handles empty WidgetSpans that do not yield selection boxes', () {
final TextSpan text = TextSpan(text: '', children: <InlineSpan>[
......
......@@ -99,7 +99,7 @@ void main() {
expect(fakePlatformViewController.dispatchedPointerEvents, isNotEmpty);
});
}, skip: isBrowser); // TODO(yjbanov): fails on Web with obscured stack trace: https://github.com/flutter/flutter/issues/42770
});
// Regression test for https://github.com/flutter/flutter/issues/69431
test('multi-finger touch test', () {
......
......@@ -262,7 +262,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); // https://github.com/flutter/flutter/issues/42767
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/49857
test('RenderOpacity does not composite if it is transparent', () {
final RenderOpacity renderOpacity = RenderOpacity(
......
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