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
3749ff02
Unverified
Commit
3749ff02
authored
Jun 07, 2021
by
Abhishek Ghaskata
Committed by
GitHub
Jun 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate gallery test to null safety (#84065)
parent
13c02ffd
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
9 additions
and
27 deletions
+9
-27
scroll_perf_test.dart
...n_tests/flutter_gallery/test_driver/scroll_perf_test.dart
+1
-4
scroll_perf_web.dart
...on_tests/flutter_gallery/test_driver/scroll_perf_web.dart
+0
-2
scroll_perf_web_test.dart
...sts/flutter_gallery/test_driver/scroll_perf_web_test.dart
+1
-4
transitions_perf_e2e.dart
...sts/flutter_gallery/test_driver/transitions_perf_e2e.dart
+0
-1
transitions_perf_e2e_test.dart
...lutter_gallery/test_driver/transitions_perf_e2e_test.dart
+2
-4
transitions_perf_e2e_with_semantics.dart
...lery/test_driver/transitions_perf_e2e_with_semantics.dart
+0
-1
transitions_perf_hybrid_test.dart
...ter_gallery/test_driver/transitions_perf_hybrid_test.dart
+0
-2
transitions_perf_test.dart
...ts/flutter_gallery/test_driver/transitions_perf_test.dart
+5
-8
transitions_perf_with_semantics_test.dart
...ery/test_driver/transitions_perf_with_semantics_test.dart
+0
-1
No files found.
dev/integration_tests/flutter_gallery/test_driver/scroll_perf_test.dart
View file @
3749ff02
...
...
@@ -2,14 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
group
(
'scrolling performance test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
...
...
@@ -18,7 +16,6 @@ void main() {
});
tearDownAll
(()
async
{
if
(
driver
!=
null
)
driver
.
close
();
});
...
...
dev/integration_tests/flutter_gallery/test_driver/scroll_perf_web.dart
View file @
3749ff02
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'package:flutter/material.dart'
;
import
'package:flutter_driver/driver_extension.dart'
;
import
'package:flutter_gallery/gallery/app.dart'
show
GalleryApp
;
...
...
dev/integration_tests/flutter_gallery/test_driver/scroll_perf_web_test.dart
View file @
3749ff02
...
...
@@ -2,21 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
void
main
(
)
{
group
(
'scrolling performance test'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
if
(
driver
!=
null
)
driver
.
close
();
});
...
...
dev/integration_tests/flutter_gallery/test_driver/transitions_perf_e2e.dart
View file @
3749ff02
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_gallery/demo_lists.dart'
;
...
...
dev/integration_tests/flutter_gallery/test_driver/transitions_perf_e2e_test.dart
View file @
3749ff02
...
...
@@ -2,15 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'package:integration_test/integration_test_driver.dart'
as
driver
;
Future
<
void
>
main
()
=>
driver
.
integrationDriver
(
timeout:
const
Duration
(
minutes:
5
),
responseDataCallback:
(
Map
<
String
,
dynamic
>
data
)
async
{
responseDataCallback:
(
Map
<
String
,
dynamic
>
?
data
)
async
{
await
driver
.
writeResponseData
(
data
[
'performance'
]
as
Map
<
String
,
dynamic
>,
data
!
[
'performance'
]
as
Map
<
String
,
dynamic
>,
testOutputFilename:
'e2e_perf_summary'
,
);
}
...
...
dev/integration_tests/flutter_gallery/test_driver/transitions_perf_e2e_with_semantics.dart
View file @
3749ff02
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'transitions_perf_e2e.dart'
as
transitions_perf
;
void
main
(
)
{
...
...
dev/integration_tests/flutter_gallery/test_driver/transitions_perf_hybrid_test.dart
View file @
3749ff02
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'transitions_perf_test.dart'
as
transitions_perf_test
;
void
main
(
[
List
<
String
>
args
=
const
<
String
>[]])
=>
transitions_perf_test
.
main
(
...
...
dev/integration_tests/flutter_gallery/test_driver/transitions_perf_test.dart
View file @
3749ff02
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'dart:convert'
show
JsonEncoder
,
json
;
import
'package:file/file.dart'
;
...
...
@@ -27,8 +25,8 @@ List<String> _allDemos = <String>[];
/// it into a histogram, and saves to a JSON file.
Future
<
void
>
saveDurationsHistogram
(
List
<
Map
<
String
,
dynamic
>>
events
,
String
outputPath
)
async
{
final
Map
<
String
,
List
<
int
>>
durations
=
<
String
,
List
<
int
>>{};
Map
<
String
,
dynamic
>
startEvent
;
int
frameStart
;
Map
<
String
,
dynamic
>
?
startEvent
;
int
?
frameStart
;
// Save the duration of the first frame after each 'Start Transition' event.
for
(
final
Map
<
String
,
dynamic
>
event
in
events
)
{
...
...
@@ -46,7 +44,7 @@ Future<void> saveDurationsHistogram(List<Map<String, dynamic>> events, String ou
assert
(
phase
==
'E'
);
final
String
routeName
=
startEvent
[
'args'
][
'to'
]
as
String
;
durations
[
routeName
]
??=
<
int
>[];
durations
[
routeName
]
.
add
(
timestamp
-
frameStart
);
durations
[
routeName
]
!.
add
(
timestamp
-
frameStart
!
);
startEvent
=
null
;
frameStart
=
null
;
}
...
...
@@ -105,7 +103,7 @@ Future<void> saveDurationsHistogram(List<Map<String, dynamic>> events, String ou
/// home screen twice.
Future
<
void
>
runDemos
(
List
<
String
>
demos
,
FlutterDriver
driver
)
async
{
final
SerializableFinder
demoList
=
find
.
byValueKey
(
'GalleryDemoList'
);
String
currentDemoCategory
;
String
?
currentDemoCategory
;
for
(
final
String
demo
in
demos
)
{
if
(
kSkippedDemos
.
contains
(
demo
))
...
...
@@ -158,7 +156,7 @@ void main([List<String> args = const <String>[]]) {
final
bool
withSemantics
=
args
.
contains
(
'--with_semantics'
);
final
bool
hybrid
=
args
.
contains
(
'--hybrid'
);
group
(
'flutter gallery transitions'
,
()
{
FlutterDriver
driver
;
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
...
...
@@ -176,7 +174,6 @@ void main([List<String> args = const <String>[]]) {
});
tearDownAll
(()
async
{
if
(
driver
!=
null
)
await
driver
.
close
();
});
...
...
dev/integration_tests/flutter_gallery/test_driver/transitions_perf_with_semantics_test.dart
View file @
3749ff02
...
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.9
import
'transitions_perf_test.dart'
as
transitions_perf_test
;
void
main
(
)
{
...
...
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