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
225a43d9
Unverified
Commit
225a43d9
authored
Aug 05, 2021
by
Darren Austin
Committed by
GitHub
Aug 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated skipped tests for rendering directory. (#87700)
parent
ec86605a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
67 deletions
+63
-67
editable_test.dart
packages/flutter/test/rendering/editable_test.dart
+47
-51
first_frame_test.dart
packages/flutter/test/rendering/first_frame_test.dart
+1
-1
image_test.dart
packages/flutter/test/rendering/image_test.dart
+3
-3
layers_test.dart
packages/flutter/test/rendering/layers_test.dart
+1
-1
paragraph_test.dart
packages/flutter/test/rendering/paragraph_test.dart
+9
-9
platform_view_test.dart
packages/flutter/test/rendering/platform_view_test.dart
+1
-1
proxy_box_test.dart
packages/flutter/test/rendering/proxy_box_test.dart
+1
-1
No files found.
packages/flutter/test/rendering/editable_test.dart
View file @
225a43d9
...
@@ -65,7 +65,7 @@ void testVariants(
...
@@ -65,7 +65,7 @@ void testVariants(
await
variant
.
tearDown
(
value
,
memento
);
await
variant
.
tearDown
(
value
,
memento
);
}
}
},
},
skip:
skip
,
skip:
skip
,
// [intended] just part of the API.
timeout:
timeout
,
timeout:
timeout
,
tags:
tags
,
tags:
tags
,
);
);
...
@@ -364,11 +364,7 @@ void main() {
...
@@ -364,11 +364,7 @@ void main() {
pumpFrame
(
phase:
EnginePhase
.
compositingBits
);
pumpFrame
(
phase:
EnginePhase
.
compositingBits
);
expect
(
editable
,
paintsExactlyCountTimes
(
#drawRRect
,
0
));
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'
,
()
{
test
(
'text is painted above selection'
,
()
{
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
();
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
();
...
@@ -545,7 +541,7 @@ void main() {
...
@@ -545,7 +541,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
);
// https://github.com/flutter/flutter/issues/61026
}
);
test
(
'selects readonly renderEditable matches native behavior for android'
,
()
{
test
(
'selects readonly renderEditable matches native behavior for android'
,
()
{
// Regression test for https://github.com/flutter/flutter/issues/79166.
// Regression test for https://github.com/flutter/flutter/issues/79166.
...
@@ -878,7 +874,7 @@ void main() {
...
@@ -878,7 +874,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
);
// https://github.com/flutter/flutter/issues/42772
}
);
test
(
'moveSelectionLeft/RightByLine stays on the current line'
,
()
async
{
test
(
'moveSelectionLeft/RightByLine stays on the current line'
,
()
async
{
const
String
text
=
'one two three
\n\n
four five six'
;
const
String
text
=
'one two three
\n\n
four five six'
;
...
@@ -1321,7 +1317,7 @@ void main() {
...
@@ -1321,7 +1317,7 @@ void main() {
editable
.
moveSelectionLeft
(
SelectionChangedCause
.
keyboard
);
editable
.
moveSelectionLeft
(
SelectionChangedCause
.
keyboard
);
expect
(
currentSelection
.
isCollapsed
,
true
);
expect
(
currentSelection
.
isCollapsed
,
true
);
expect
(
currentSelection
.
baseOffset
,
2
);
expect
(
currentSelection
.
baseOffset
,
2
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/58068
}
);
test
(
'arrow keys with selection text and shift'
,
()
async
{
test
(
'arrow keys with selection text and shift'
,
()
async
{
const
String
text
=
'012345'
;
const
String
text
=
'012345'
;
...
@@ -1385,7 +1381,7 @@ void main() {
...
@@ -1385,7 +1381,7 @@ void main() {
expect
(
currentSelection
.
isCollapsed
,
false
);
expect
(
currentSelection
.
isCollapsed
,
false
);
expect
(
currentSelection
.
baseOffset
,
4
);
expect
(
currentSelection
.
baseOffset
,
4
);
expect
(
currentSelection
.
extentOffset
,
1
);
expect
(
currentSelection
.
extentOffset
,
1
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/58068
}
);
testVariants
(
'respects enableInteractiveSelection'
,
()
async
{
testVariants
(
'respects enableInteractiveSelection'
,
()
async
{
const
String
text
=
'012345'
;
const
String
text
=
'012345'
;
...
@@ -1447,7 +1443,7 @@ void main() {
...
@@ -1447,7 +1443,7 @@ void main() {
await
simulateKeyUpEvent
(
wordModifier
);
await
simulateKeyUpEvent
(
wordModifier
);
await
simulateKeyUpEvent
(
LogicalKeyboardKey
.
shift
);
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'
,
()
{
group
(
'delete'
,
()
{
test
(
'when as a non-collapsed selection, it should delete a selection'
,
()
async
{
test
(
'when as a non-collapsed selection, it should delete a selection'
,
()
async
{
...
@@ -1666,7 +1662,7 @@ void main() {
...
@@ -1666,7 +1662,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'tes'
);
expect
(
delegate
.
textEditingValue
.
text
,
'tes'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
3
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
3
);
}
,
skip:
isBrowser
);
});
test
(
'when using cjk characters'
,
()
async
{
test
(
'when using cjk characters'
,
()
async
{
const
String
text
=
'用多個塊測試'
;
const
String
text
=
'用多個塊測試'
;
...
@@ -1704,7 +1700,7 @@ void main() {
...
@@ -1704,7 +1700,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'用多個測試'
);
expect
(
delegate
.
textEditingValue
.
text
,
'用多個測試'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
3
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
3
);
}
,
skip:
isBrowser
);
});
test
(
'when using rtl'
,
()
async
{
test
(
'when using rtl'
,
()
async
{
const
String
text
=
'برنامج أهلا بالعالم'
;
const
String
text
=
'برنامج أهلا بالعالم'
;
...
@@ -1742,7 +1738,7 @@ void main() {
...
@@ -1742,7 +1738,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'برنامج أهلا بالعال'
);
expect
(
delegate
.
textEditingValue
.
text
,
'برنامج أهلا بالعال'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
text
.
length
-
1
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
text
.
length
-
1
);
}
,
skip:
isBrowser
);
});
});
});
group
(
'deleteByWord'
,
()
{
group
(
'deleteByWord'
,
()
{
...
@@ -1782,7 +1778,7 @@ void main() {
...
@@ -1782,7 +1778,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test h multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test h multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
}
,
skip:
isBrowser
);
});
test
(
'when includeWhiteSpace is true, it should treat a whiteSpace as a single word'
,
()
async
{
test
(
'when includeWhiteSpace is true, it should treat a whiteSpace as a single word'
,
()
async
{
const
String
text
=
'test with multiple blocks'
;
const
String
text
=
'test with multiple blocks'
;
...
@@ -1820,7 +1816,7 @@ void main() {
...
@@ -1820,7 +1816,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test withmultiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test withmultiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
9
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
9
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is after a word, it should delete the whole word'
,
()
async
{
test
(
'when cursor is after a word, it should delete the whole word'
,
()
async
{
const
String
text
=
'test with multiple blocks'
;
const
String
text
=
'test with multiple blocks'
;
...
@@ -1858,9 +1854,9 @@ void main() {
...
@@ -1858,9 +1854,9 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is prece
e
ded 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
String
text
=
'test with multiple blocks'
;
const
int
offset
=
12
;
const
int
offset
=
12
;
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
...
@@ -1896,9 +1892,9 @@ void main() {
...
@@ -1896,9 +1892,9 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is prece
e
ded by tabs spaces'
,
()
async
{
test
(
'when cursor is preceded by tabs spaces'
,
()
async
{
const
String
text
=
'test with
\t\t\t
multiple blocks'
;
const
String
text
=
'test with
\t\t\t
multiple blocks'
;
const
int
offset
=
12
;
const
int
offset
=
12
;
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
...
@@ -1934,9 +1930,9 @@ void main() {
...
@@ -1934,9 +1930,9 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is prece
e
ded 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
\n
multiple blocks'
;
const
String
text
=
'test with
\n
multiple blocks'
;
const
int
offset
=
10
;
const
int
offset
=
10
;
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
...
@@ -1972,7 +1968,7 @@ void main() {
...
@@ -1972,7 +1968,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
5
);
}
,
skip:
isBrowser
);
});
test
(
'when using cjk characters'
,
()
async
{
test
(
'when using cjk characters'
,
()
async
{
const
String
text
=
'用多個塊測試'
;
const
String
text
=
'用多個塊測試'
;
...
@@ -2010,7 +2006,7 @@ void main() {
...
@@ -2010,7 +2006,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'用多個測試'
);
expect
(
delegate
.
textEditingValue
.
text
,
'用多個測試'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
3
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
3
);
}
,
skip:
isBrowser
);
});
test
(
'when using rtl'
,
()
async
{
test
(
'when using rtl'
,
()
async
{
const
String
text
=
'برنامج أهلا بالعالم'
;
const
String
text
=
'برنامج أهلا بالعالم'
;
...
@@ -2048,7 +2044,7 @@ void main() {
...
@@ -2048,7 +2044,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'برنامج أهلا '
);
expect
(
delegate
.
textEditingValue
.
text
,
'برنامج أهلا '
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
12
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
12
);
}
,
skip:
isBrowser
);
});
test
(
'when input has obscured text, it should delete everything before the selection'
,
()
async
{
test
(
'when input has obscured text, it should delete everything before the selection'
,
()
async
{
const
int
offset
=
21
;
const
int
offset
=
21
;
...
@@ -2087,7 +2083,7 @@ void main() {
...
@@ -2087,7 +2083,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'words'
);
expect
(
delegate
.
textEditingValue
.
text
,
'words'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
}
,
skip:
isBrowser
);
});
});
});
group
(
'deleteByLine'
,
()
{
group
(
'deleteByLine'
,
()
{
...
@@ -2127,7 +2123,7 @@ void main() {
...
@@ -2127,7 +2123,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
''
);
expect
(
delegate
.
textEditingValue
.
text
,
''
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
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
{
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'
;
const
String
text
=
'test with multiple blocks'
;
...
@@ -2165,7 +2161,7 @@ void main() {
...
@@ -2165,7 +2161,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'h multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'h multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
}
,
skip:
isBrowser
);
});
test
(
'when previous character is a breakline, it should preserve it'
,
()
async
{
test
(
'when previous character is a breakline, it should preserve it'
,
()
async
{
const
String
text
=
'test with
\n
multiple blocks'
;
const
String
text
=
'test with
\n
multiple blocks'
;
...
@@ -2203,7 +2199,7 @@ void main() {
...
@@ -2203,7 +2199,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
text
);
expect
(
delegate
.
textEditingValue
.
text
,
text
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when text is multiline, it should delete until the first line break it finds'
,
()
async
{
test
(
'when text is multiline, it should delete until the first line break it finds'
,
()
async
{
const
String
text
=
'test with
\n\n
More stuff right here.
\n
multiple blocks'
;
const
String
text
=
'test with
\n\n
More stuff right here.
\n
multiple blocks'
;
...
@@ -2241,7 +2237,7 @@ void main() {
...
@@ -2241,7 +2237,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test with
\n\n
right here.
\n
multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test with
\n\n
right here.
\n
multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
11
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
11
);
}
,
skip:
isBrowser
);
});
test
(
'when input has obscured text, it should delete everything before the selection'
,
()
async
{
test
(
'when input has obscured text, it should delete everything before the selection'
,
()
async
{
const
int
offset
=
21
;
const
int
offset
=
21
;
...
@@ -2280,7 +2276,7 @@ void main() {
...
@@ -2280,7 +2276,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'words'
);
expect
(
delegate
.
textEditingValue
.
text
,
'words'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
}
,
skip:
isBrowser
);
});
});
});
group
(
'deleteForward'
,
()
{
group
(
'deleteForward'
,
()
{
...
@@ -2356,7 +2352,7 @@ void main() {
...
@@ -2356,7 +2352,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test withmultiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test withmultiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
9
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
9
);
}
,
skip:
isBrowser
);
});
test
(
'when at the end of a text, it should be a no-op'
,
()
async
{
test
(
'when at the end of a text, it should be a no-op'
,
()
async
{
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
...
@@ -2430,7 +2426,7 @@ void main() {
...
@@ -2430,7 +2426,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'est'
);
expect
(
delegate
.
textEditingValue
.
text
,
'est'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
}
,
skip:
isBrowser
);
});
test
(
'when using cjk characters'
,
()
async
{
test
(
'when using cjk characters'
,
()
async
{
const
String
text
=
'用多個塊測試'
;
const
String
text
=
'用多個塊測試'
;
...
@@ -2468,7 +2464,7 @@ void main() {
...
@@ -2468,7 +2464,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'多個塊測試'
);
expect
(
delegate
.
textEditingValue
.
text
,
'多個塊測試'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
}
,
skip:
isBrowser
);
});
test
(
'when using rtl'
,
()
async
{
test
(
'when using rtl'
,
()
async
{
const
String
text
=
'برنامج أهلا بالعالم'
;
const
String
text
=
'برنامج أهلا بالعالم'
;
...
@@ -2506,7 +2502,7 @@ void main() {
...
@@ -2506,7 +2502,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'رنامج أهلا بالعالم'
);
expect
(
delegate
.
textEditingValue
.
text
,
'رنامج أهلا بالعالم'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
0
);
}
,
skip:
isBrowser
);
});
});
});
...
@@ -2547,7 +2543,7 @@ void main() {
...
@@ -2547,7 +2543,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test w multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test w multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is before a word, it should delete the whole word'
,
()
async
{
test
(
'when cursor is before a word, it should delete the whole word'
,
()
async
{
const
String
text
=
'test with multiple blocks'
;
const
String
text
=
'test with multiple blocks'
;
...
@@ -2585,9 +2581,9 @@ void main() {
...
@@ -2585,9 +2581,9 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is prece
e
ded 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
String
text
=
'test with multiple blocks'
;
const
int
offset
=
9
;
const
int
offset
=
9
;
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
...
@@ -2623,7 +2619,7 @@ void main() {
...
@@ -2623,7 +2619,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is before tabs, it should delete the tabs and the next word'
,
()
async
{
test
(
'when cursor is before tabs, it should delete the tabs and the next word'
,
()
async
{
const
String
text
=
'test with
\t\t\t
multiple blocks'
;
const
String
text
=
'test with
\t\t\t
multiple blocks'
;
...
@@ -2661,7 +2657,7 @@ void main() {
...
@@ -2661,7 +2657,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when cursor is followed by break line, it should delete the next word'
,
()
async
{
test
(
'when cursor is followed by break line, it should delete the next word'
,
()
async
{
const
String
text
=
'test with
\n\n\n
multiple blocks'
;
const
String
text
=
'test with
\n\n\n
multiple blocks'
;
...
@@ -2699,7 +2695,7 @@ void main() {
...
@@ -2699,7 +2695,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test with blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when using cjk characters'
,
()
async
{
test
(
'when using cjk characters'
,
()
async
{
const
String
text
=
'用多個塊測試'
;
const
String
text
=
'用多個塊測試'
;
...
@@ -2737,7 +2733,7 @@ void main() {
...
@@ -2737,7 +2733,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'多個塊測試'
);
expect
(
delegate
.
textEditingValue
.
text
,
'多個塊測試'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when using rtl'
,
()
async
{
test
(
'when using rtl'
,
()
async
{
const
String
text
=
'برنامج أهلا بالعالم'
;
const
String
text
=
'برنامج أهلا بالعالم'
;
...
@@ -2775,7 +2771,7 @@ void main() {
...
@@ -2775,7 +2771,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
' أهلا بالعالم'
);
expect
(
delegate
.
textEditingValue
.
text
,
' أهلا بالعالم'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when input has obscured text, it should delete everything after the selection'
,
()
async
{
test
(
'when input has obscured text, it should delete everything after the selection'
,
()
async
{
const
int
offset
=
4
;
const
int
offset
=
4
;
...
@@ -2814,7 +2810,7 @@ void main() {
...
@@ -2814,7 +2810,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
});
});
group
(
'deleteForwardByLine'
,
()
{
group
(
'deleteForwardByLine'
,
()
{
...
@@ -2854,7 +2850,7 @@ void main() {
...
@@ -2854,7 +2850,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
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
{
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'
;
const
String
text
=
'test with multiple blocks'
;
...
@@ -2892,7 +2888,7 @@ void main() {
...
@@ -2892,7 +2888,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test wit'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test wit'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when next character is a breakline, it should preserve it'
,
()
async
{
test
(
'when next character is a breakline, it should preserve it'
,
()
async
{
const
String
text
=
'test with
\n\n\n
multiple blocks'
;
const
String
text
=
'test with
\n\n\n
multiple blocks'
;
...
@@ -2930,7 +2926,7 @@ void main() {
...
@@ -2930,7 +2926,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
text
);
expect
(
delegate
.
textEditingValue
.
text
,
text
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
test
(
'when text is multiline, it should delete until the first line break it finds'
,
()
async
{
test
(
'when text is multiline, it should delete until the first line break it finds'
,
()
async
{
const
String
text
=
'test with
\n\n
More stuff right here.
\n
multiple blocks'
;
const
String
text
=
'test with
\n\n
More stuff right here.
\n
multiple blocks'
;
...
@@ -2968,7 +2964,7 @@ void main() {
...
@@ -2968,7 +2964,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'te
\n\n
More stuff right here.
\n
multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
text
,
'te
\n\n
More stuff right here.
\n
multiple blocks'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
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
{
test
(
'when input has obscured text, it should delete everything after the selection'
,
()
async
{
const
int
offset
=
4
;
const
int
offset
=
4
;
...
@@ -3007,7 +3003,7 @@ void main() {
...
@@ -3007,7 +3003,7 @@ void main() {
expect
(
delegate
.
textEditingValue
.
text
,
'test'
);
expect
(
delegate
.
textEditingValue
.
text
,
'test'
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
isCollapsed
,
true
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
expect
(
delegate
.
textEditingValue
.
selection
.
baseOffset
,
offset
);
}
,
skip:
isBrowser
);
});
});
});
test
(
'getEndpointsForSelection handles empty characters'
,
()
{
test
(
'getEndpointsForSelection handles empty characters'
,
()
{
...
@@ -3128,7 +3124,7 @@ void main() {
...
@@ -3128,7 +3124,7 @@ void main() {
// Since the range covers an entire line, the Rect should also be almost
// Since the range covers an entire line, the Rect should also be almost
// as wide as the entire paragraph (give or take 1 character).
// as wide as the entire paragraph (give or take 1 character).
expect
(
composingRect
.
width
,
greaterThan
(
200
-
10
));
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'
,
()
{
group
(
'previousCharacter'
,
()
{
...
@@ -3896,7 +3892,7 @@ void main() {
...
@@ -3896,7 +3892,7 @@ void main() {
pumpFrame
();
pumpFrame
();
expect
(
maxIntrinsicWidth
,
278
);
expect
(
maxIntrinsicWidth
,
278
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/61020
}
);
test
(
'hits correct WidgetSpan when not scrolled'
,
()
{
test
(
'hits correct WidgetSpan when not scrolled'
,
()
{
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
final
TextSelectionDelegate
delegate
=
FakeEditableTextState
()
...
...
packages/flutter/test/rendering/first_frame_test.dart
View file @
225a43d9
...
@@ -24,7 +24,7 @@ void main() {
...
@@ -24,7 +24,7 @@ void main() {
binding
.
handleDrawFrame
();
binding
.
handleDrawFrame
();
await
expectLater
(
completer
.
future
,
completes
);
await
expectLater
(
completer
.
future
,
completes
);
},
skip:
!
kIsWeb
);
},
skip:
!
kIsWeb
);
// [intended] the test is only makes sense on the web.
}
}
class
TestRenderBinding
extends
BindingBase
class
TestRenderBinding
extends
BindingBase
...
...
packages/flutter/test/rendering/image_test.dart
View file @
225a43d9
...
@@ -189,7 +189,7 @@ Future<void> main() async {
...
@@ -189,7 +189,7 @@ Future<void> main() async {
image
.
dispose
();
image
.
dispose
();
expect
(
image
.
debugGetOpenHandleStackTraces
()!.
length
,
0
);
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
{
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
);
final
ui
.
Image
image
=
await
createTestImage
(
width:
10
,
height:
10
,
cache:
false
);
...
@@ -206,7 +206,7 @@ Future<void> main() async {
...
@@ -206,7 +206,7 @@ Future<void> main() async {
image
.
dispose
();
image
.
dispose
();
expect
(
image
.
debugGetOpenHandleStackTraces
()!.
length
,
0
);
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
{
test
(
'Render image disposes its image when it is disposed'
,
()
async
{
final
ui
.
Image
image
=
await
createTestImage
(
width:
10
,
height:
10
,
cache:
false
);
final
ui
.
Image
image
=
await
createTestImage
(
width:
10
,
height:
10
,
cache:
false
);
...
@@ -221,5 +221,5 @@ Future<void> main() async {
...
@@ -221,5 +221,5 @@ Future<void> main() async {
image
.
dispose
();
image
.
dispose
();
expect
(
image
.
debugGetOpenHandleStackTraces
()!.
length
,
0
);
expect
(
image
.
debugGetOpenHandleStackTraces
()!.
length
,
0
);
},
skip:
kIsWeb
);
//
Web doesn't track open image handles.
},
skip:
kIsWeb
);
//
https://github.com/flutter/flutter/issues/87442
}
}
packages/flutter/test/rendering/layers_test.dart
View file @
225a43d9
...
@@ -434,7 +434,7 @@ void main() {
...
@@ -434,7 +434,7 @@ void main() {
// Ensure we can render the same scene again after rendering an interior
// Ensure we can render the same scene again after rendering an interior
// layer.
// layer.
parent
.
buildScene
(
SceneBuilder
());
parent
.
buildScene
(
SceneBuilder
());
},
skip:
isBrowser
);
// TODO(yjbanov): `toImage` doesn't work on the Web: https://github.com/flutter/flutter/issues/4
276
7
},
skip:
isBrowser
);
// TODO(yjbanov): `toImage` doesn't work on the Web: https://github.com/flutter/flutter/issues/4
985
7
test
(
'PictureLayer does not let you call dispose unless refcount is 0'
,
()
{
test
(
'PictureLayer does not let you call dispose unless refcount is 0'
,
()
{
PictureLayer
layer
=
PictureLayer
(
Rect
.
zero
);
PictureLayer
layer
=
PictureLayer
(
Rect
.
zero
);
...
...
packages/flutter/test/rendering/paragraph_test.dart
View file @
225a43d9
...
@@ -118,7 +118,7 @@ void main() {
...
@@ -118,7 +118,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
);
// https://github.com/flutter/flutter/issues/61015
}
);
test
(
'getBoxesForSelection control test'
,
()
{
test
(
'getBoxesForSelection control test'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
@@ -184,7 +184,7 @@ void main() {
...
@@ -184,7 +184,7 @@ void main() {
expect
(
boxes
[
2
],
const
TextBox
.
fromLTRBD
(
0.0
,
10.0
,
130.0
,
20.0
,
TextDirection
.
ltr
));
expect
(
boxes
[
2
],
const
TextBox
.
fromLTRBD
(
0.0
,
10.0
,
130.0
,
20.0
,
TextDirection
.
ltr
));
// 'fifth':
// 'fifth':
expect
(
boxes
[
3
],
const
TextBox
.
fromLTRBD
(
0.0
,
20.0
,
50.0
,
30.0
,
TextDirection
.
ltr
));
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'
,
()
{
test
(
'getBoxesForSelection test with boxHeightStyle and boxWidthStyle set to max'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
@@ -243,7 +243,7 @@ void main() {
...
@@ -243,7 +243,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
);
// https://github.com/flutter/flutter/issues/61017
}
);
test
(
'overflow test'
,
()
{
test
(
'overflow test'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
@@ -439,7 +439,7 @@ void main() {
...
@@ -439,7 +439,7 @@ void main() {
expect
(
boxes
[
2
].
toRect
().
height
,
moreOrLessEquals
(
26.0
,
epsilon:
0.0001
));
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
().
width
,
anyOf
(
14.0
,
13.0
));
expect
(
boxes
[
3
].
toRect
().
height
,
moreOrLessEquals
(
13.0
,
epsilon:
0.0001
));
expect
(
boxes
[
3
].
toRect
().
height
,
moreOrLessEquals
(
13.0
,
epsilon:
0.0001
));
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/61016
}
);
test
(
'toStringDeep'
,
()
{
test
(
'toStringDeep'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraph
(
final
RenderParagraph
paragraph
=
RenderParagraph
(
...
@@ -605,7 +605,7 @@ void main() {
...
@@ -605,7 +605,7 @@ void main() {
// intrinsicHeight = singleLineHeight * textScaleFactor * two lines.
// intrinsicHeight = singleLineHeight * textScaleFactor * two lines.
expect
(
maxIntrinsicHeight
,
singleLineHeight
*
2.0
*
2
);
expect
(
maxIntrinsicHeight
,
singleLineHeight
*
2.0
*
2
);
expect
(
maxIntrinsicHeight
,
minIntrinsicHeight
);
expect
(
maxIntrinsicHeight
,
minIntrinsicHeight
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/61020
}
);
test
(
'can compute IntrinsicWidth for widget span'
,
()
{
test
(
'can compute IntrinsicWidth for widget span'
,
()
{
// Regression test for https://github.com/flutter/flutter/issues/59316
// Regression test for https://github.com/flutter/flutter/issues/59316
...
@@ -648,7 +648,7 @@ void main() {
...
@@ -648,7 +648,7 @@ void main() {
final
double
maxIntrinsicWidth
=
paragraph
.
computeMaxIntrinsicWidth
(
fixedHeight
);
final
double
maxIntrinsicWidth
=
paragraph
.
computeMaxIntrinsicWidth
(
fixedHeight
);
// maxIntrinsicWidth = widthForOneLine * textScaleFactor
// maxIntrinsicWidth = widthForOneLine * textScaleFactor
expect
(
maxIntrinsicWidth
,
widthForOneLine
*
2.0
);
expect
(
maxIntrinsicWidth
,
widthForOneLine
*
2.0
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/61020
}
);
test
(
'inline widgets multiline test'
,
()
{
test
(
'inline widgets multiline test'
,
()
{
const
TextSpan
text
=
TextSpan
(
const
TextSpan
text
=
TextSpan
(
...
@@ -714,7 +714,7 @@ void main() {
...
@@ -714,7 +714,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
(
...
@@ -733,7 +733,7 @@ void main() {
...
@@ -733,7 +733,7 @@ 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
}
);
test
(
'assembleSemanticsNode handles text spans that do not yield selection boxes'
,
()
{
test
(
'assembleSemanticsNode handles text spans that do not yield selection boxes'
,
()
{
final
RenderParagraph
paragraph
=
RenderParagraphWithEmptySelectionBoxList
(
final
RenderParagraph
paragraph
=
RenderParagraphWithEmptySelectionBoxList
(
...
@@ -750,7 +750,7 @@ void main() {
...
@@ -750,7 +750,7 @@ void main() {
final
SemanticsNode
node
=
SemanticsNode
();
final
SemanticsNode
node
=
SemanticsNode
();
paragraph
.
assembleSemanticsNode
(
node
,
SemanticsConfiguration
(),
<
SemanticsNode
>[]);
paragraph
.
assembleSemanticsNode
(
node
,
SemanticsConfiguration
(),
<
SemanticsNode
>[]);
expect
(
node
.
childrenCount
,
2
);
expect
(
node
.
childrenCount
,
2
);
}
,
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/61020
}
);
test
(
'assembleSemanticsNode handles empty WidgetSpans that do not yield selection boxes'
,
()
{
test
(
'assembleSemanticsNode handles empty WidgetSpans that do not yield selection boxes'
,
()
{
final
TextSpan
text
=
TextSpan
(
text:
''
,
children:
<
InlineSpan
>[
final
TextSpan
text
=
TextSpan
(
text:
''
,
children:
<
InlineSpan
>[
...
...
packages/flutter/test/rendering/platform_view_test.dart
View file @
225a43d9
...
@@ -99,7 +99,7 @@ void main() {
...
@@ -99,7 +99,7 @@ void main() {
expect
(
fakePlatformViewController
.
dispatchedPointerEvents
,
isNotEmpty
);
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
// Regression test for https://github.com/flutter/flutter/issues/69431
test
(
'multi-finger touch test'
,
()
{
test
(
'multi-finger touch test'
,
()
{
...
...
packages/flutter/test/rendering/proxy_box_test.dart
View file @
225a43d9
...
@@ -262,7 +262,7 @@ void main() {
...
@@ -262,7 +262,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
);
// https://github.com/flutter/flutter/issues/4
276
7
},
skip:
isBrowser
);
// https://github.com/flutter/flutter/issues/4
985
7
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
(
...
...
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