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
f84831c1
Unverified
Commit
f84831c1
authored
Oct 11, 2023
by
droidbg
Committed by
GitHub
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[leak-tracking] Add leak tracking in test/rendering - 1 (#136275)
parent
f2931dbd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
14 deletions
+17
-14
debug_overflow_indicator_test.dart
...flutter/test/rendering/debug_overflow_indicator_test.dart
+4
-3
error_test.dart
packages/flutter/test/rendering/error_test.dart
+2
-1
flex_overflow_test.dart
packages/flutter/test/rendering/flex_overflow_test.dart
+2
-1
localized_fonts_test.dart
packages/flutter/test/rendering/localized_fonts_test.dart
+7
-7
non_normalized_constraints_test.dart
...utter/test/rendering/non_normalized_constraints_test.dart
+2
-2
No files found.
packages/flutter/test/rendering/debug_overflow_indicator_test.dart
View file @
f84831c1
...
...
@@ -4,9 +4,10 @@
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
void
main
(
)
{
testWidgets
(
'overflow indicator is not shown when not overflowing'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'overflow indicator is not shown when not overflowing'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
Center
(
child:
UnconstrainedBox
(
...
...
@@ -18,7 +19,7 @@ void main() {
expect
(
find
.
byType
(
UnconstrainedBox
),
isNot
(
paints
..
rect
()));
});
testWidgets
(
'overflow indicator is shown when overflowing'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'overflow indicator is shown when overflowing'
,
(
WidgetTester
tester
)
async
{
const
UnconstrainedBox
box
=
UnconstrainedBox
(
child:
SizedBox
(
width:
200.0
,
height:
200.0
),
);
...
...
@@ -54,7 +55,7 @@ void main() {
expect
(
find
.
byType
(
UnconstrainedBox
),
paints
..
rect
());
});
testWidgets
(
'overflow indicator is not shown when constraint size is zero.'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'overflow indicator is not shown when constraint size is zero.'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
Center
(
child:
SizedBox
(
...
...
packages/flutter/test/rendering/error_test.dart
View file @
f84831c1
...
...
@@ -5,12 +5,13 @@
import
'package:flutter/rendering.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
/// Unit tests error.dart's usage via ErrorWidget.
void
main
(
)
{
const
String
errorMessage
=
'Some error message'
;
testWidgets
(
'test draw error paragraph'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'test draw error paragraph'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
ErrorWidget
(
Exception
(
errorMessage
)));
expect
(
find
.
byType
(
ErrorWidget
),
...
...
packages/flutter/test/rendering/flex_overflow_test.dart
View file @
f84831c1
...
...
@@ -4,9 +4,10 @@
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
void
main
(
)
{
testWidgets
(
'Flex overflow indicator'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Flex overflow indicator'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
Center
(
child:
Column
(
...
...
packages/flutter/test/rendering/localized_fonts_test.dart
View file @
f84831c1
...
...
@@ -9,12 +9,12 @@ library;
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
// TODO(hansmuller): when https://github.com/flutter/flutter/issues/17700
// is fixed, these tests should be updated to use a real font (not Ahem).
void
main
(
)
{
testWidgets
(
testWidgets
WithLeakTracking
(
'Material2 - RichText TextSpan styles with different locales'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -60,7 +60,7 @@ void main() {
},
);
testWidgets
(
testWidgets
WithLeakTracking
(
'Material3 - RichText TextSpan styles with different locales'
,
(
WidgetTester
tester
)
async
{
...
...
@@ -106,7 +106,7 @@ void main() {
},
);
testWidgets
(
testWidgets
WithLeakTracking
(
'Material2 - Text with locale-specific glyphs, ambient locale'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -158,7 +158,7 @@ void main() {
},
);
testWidgets
(
testWidgets
WithLeakTracking
(
'Material3 - Text with locale-specific glyphs, ambient locale'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -210,7 +210,7 @@ void main() {
},
);
testWidgets
(
testWidgets
WithLeakTracking
(
'Material2 - Text with locale-specific glyphs, explicit locale'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
@@ -254,7 +254,7 @@ void main() {
},
);
testWidgets
(
testWidgets
WithLeakTracking
(
'Material3 - Text with locale-specific glyphs, explicit locale'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/rendering/non_normalized_constraints_test.dart
View file @
f84831c1
...
...
@@ -3,11 +3,11 @@
// found in the LICENSE file.
// THIS TEST IS SENSITIVE TO LINE NUMBERS AT THE TOP OF THIS FILE
import
'package:flutter/foundation.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
class
RenderFoo
extends
RenderShiftedBox
{
RenderFoo
({
RenderBox
?
child
})
:
super
(
child
);
...
...
@@ -32,7 +32,7 @@ class Foo extends SingleChildRenderObjectWidget {
// END OF SENSITIVE SECTION
void
main
(
)
{
testWidgets
(
'Stack parsing in non-normalized constraints error'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'Stack parsing in non-normalized constraints error'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
Foo
(
child:
Placeholder
()),
Duration
.
zero
,
EnginePhase
.
layout
);
final
Object
?
exception
=
tester
.
takeException
();
final
String
text
=
exception
.
toString
();
...
...
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