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
26c36623
Commit
26c36623
authored
Mar 27, 2017
by
Hans Muller
Committed by
GitHub
Mar 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a TabBar regression test (#9038)
parent
6bf0ceb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
tabs_test.dart
packages/flutter/test/material/tabs_test.dart
+29
-0
No files found.
packages/flutter/test/material/tabs_test.dart
View file @
26c36623
...
...
@@ -730,4 +730,33 @@ void main() {
expect
(
indicatorRect2
.
width
,
400.0
);
expect
(
indicatorRect2
.
height
,
2.0
);
});
testWidgets
(
'TabBarView child disposed during animation'
,
(
WidgetTester
tester
)
async
{
// This is a regression test for this patch:
// https://github.com/flutter/flutter/pull/9015
final
TabController
controller
=
new
TabController
(
vsync:
const
TestVSync
(),
length:
2
,
);
Widget
buildFrame
()
{
return
new
Material
(
child:
new
TabBar
(
key:
new
UniqueKey
(),
controller:
controller
,
tabs:
<
Widget
>[
new
Text
(
'A'
),
new
Text
(
'B'
)
],
),
);
}
await
tester
.
pumpWidget
(
buildFrame
());
// The original TabBar will be disposed. The controller should no
// longer have any listeners from the original TabBar.
await
tester
.
pumpWidget
(
buildFrame
());
controller
.
index
=
1
;
await
tester
.
pump
(
const
Duration
(
milliseconds:
300
));
});
}
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