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
ea777fea
Unverified
Commit
ea777fea
authored
Jul 09, 2020
by
Kate Lovett
Committed by
GitHub
Jul 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip Audit - Rendering Library (#58640)
parent
61a04b15
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
37 deletions
+31
-37
editable_test.dart
packages/flutter/test/rendering/editable_test.dart
+12
-12
layers_test.dart
packages/flutter/test/rendering/layers_test.dart
+5
-5
localized_fonts_test.dart
packages/flutter/test/rendering/localized_fonts_test.dart
+0
-2
paragraph_test.dart
packages/flutter/test/rendering/paragraph_test.dart
+10
-14
positioned_box_test.dart
packages/flutter/test/rendering/positioned_box_test.dart
+1
-1
proxy_box_test.dart
packages/flutter/test/rendering/proxy_box_test.dart
+1
-1
sliver_cache_test.dart
packages/flutter/test/rendering/sliver_cache_test.dart
+1
-1
viewport_test.dart
packages/flutter/test/rendering/viewport_test.dart
+1
-1
No files found.
packages/flutter/test/rendering/editable_test.dart
View file @
ea777fea
...
...
@@ -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
();
...
...
packages/flutter/test/rendering/layers_test.dart
View file @
ea777fea
...
...
@@ -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
();
...
...
packages/flutter/test/rendering/localized_fonts_test.dart
View file @
ea777fea
...
...
@@ -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
);
}
packages/flutter/test/rendering/paragraph_test.dart
View file @
ea777fea
...
...
@@ -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:
is
Windows
||
isBrowser
);
// Ahem-based tests don't yet quite work on Windows
},
skip:
is
Browser
);
// 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
}
packages/flutter/test/rendering/positioned_box_test.dart
View file @
ea777fea
...
...
@@ -71,5 +71,5 @@ void main() {
expect
(
positioner
.
size
.
width
,
equals
(
200.0
));
expect
(
positioner
.
size
.
height
,
equals
(
200.0
));
}
,
skip:
isBrowser
);
});
}
packages/flutter/test/rendering/proxy_box_test.dart
View file @
ea777fea
...
...
@@ -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
(
...
...
packages/flutter/test/rendering/sliver_cache_test.dart
View file @
ea777fea
...
...
@@ -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
...
...
packages/flutter/test/rendering/viewport_test.dart
View file @
ea777fea
...
...
@@ -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
>[];
...
...
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