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
8661d8ae
Unverified
Commit
8661d8ae
authored
Feb 15, 2019
by
xster
Committed by
GitHub
Feb 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test text paint orders by color (#27983)
parent
22f88809
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
editable_test.dart
packages/flutter/test/rendering/editable_test.dart
+6
-5
No files found.
packages/flutter/test/rendering/editable_test.dart
View file @
8661d8ae
...
...
@@ -175,7 +175,7 @@ void main() {
backgroundCursorColor:
Colors
.
grey
,
selectionColor:
Colors
.
black
,
textDirection:
TextDirection
.
ltr
,
cursorColor:
const
Color
.
fromARGB
(
0xFF
,
0xFF
,
0x00
,
0x00
)
,
cursorColor:
Colors
.
red
,
offset:
ViewportOffset
.
zero
(),
textSelectionDelegate:
delegate
,
text:
const
TextSpan
(
...
...
@@ -196,8 +196,8 @@ void main() {
expect
(
editable
,
paints
//
This is a big selection rectangle, not the
cursor.
..
rect
(
color:
Colors
.
black
,
rect:
Rect
.
fromLTWH
(
0
,
0
,
30
,
10
)
)
//
Check that it's the black selection box, not the red
cursor.
..
rect
(
color:
Colors
.
black
)
..
paragraph
(),
);
...
...
@@ -235,7 +235,8 @@ void main() {
editable
,
paints
..
paragraph
()
..
rect
(
color:
Colors
.
red
[
500
],
rect:
Rect
.
fromLTWH
(
20
,
2
,
1
,
6
)),
// Red collapsed cursor is painted, not a selection box.
..
rect
(
color:
Colors
.
red
[
500
]),
);
// There is exactly one rect paint (0 selection, 1 cursor).
...
...
@@ -248,7 +249,7 @@ void main() {
editable
,
// The paint order is now flipped.
paints
..
rect
(
color:
Colors
.
red
[
500
]
,
rect:
Rect
.
fromLTWH
(
20
,
2
,
1
,
6
)
)
..
rect
(
color:
Colors
.
red
[
500
])
..
paragraph
(),
);
expect
(
editable
,
paintsExactlyCountTimes
(
#drawRect
,
1
));
...
...
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