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
b0fa93ea
Unverified
Commit
b0fa93ea
authored
May 15, 2018
by
Chris Bracken
Committed by
GitHub
May 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Adjust scroll increment in transition perf test (#17593)" (#17623)
This reverts commit
1095eafe
.
parent
c169136e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
32 deletions
+7
-32
transitions_perf.dart
examples/flutter_gallery/test_driver/transitions_perf.dart
+4
-18
transitions_perf_test.dart
...es/flutter_gallery/test_driver/transitions_perf_test.dart
+3
-14
No files found.
examples/flutter_gallery/test_driver/transitions_perf.dart
View file @
b0fa93ea
...
...
@@ -4,30 +4,16 @@
import
'dart:async'
;
import
'dart:convert'
show
JsonEncoder
;
import
'dart:ui'
show
window
,
Size
;
import
'package:flutter_driver/driver_extension.dart'
;
import
'package:flutter_gallery/gallery/demos.dart'
;
import
'package:flutter_gallery/main.dart'
as
app
;
Future
<
String
>
_handleMessages
(
String
message
)
async
{
assert
(
message
==
'demoNames'
||
message
==
'mediaSize'
);
const
JsonEncoder
jsonEncoder
=
const
JsonEncoder
.
withIndent
(
' '
);
switch
(
message
)
{
case
'demoNames'
:
return
jsonEncoder
.
convert
(
kAllGalleryDemos
.
map
((
GalleryDemo
demo
)
=>
'
${demo.title}
@
${demo.category.name}
'
).
toList
(),
);
case
'mediaSize'
:
final
Size
size
=
window
.
physicalSize
/
window
.
devicePixelRatio
;
return
jsonEncoder
.
convert
(<
String
,
double
>{
'width'
:
size
.
width
,
'height'
:
size
.
height
,
});
}
assert
(
false
,
'Not reachable'
);
return
''
;
assert
(
message
==
'demoNames'
);
return
const
JsonEncoder
.
withIndent
(
' '
).
convert
(
kAllGalleryDemos
.
map
((
GalleryDemo
demo
)
=>
'
${demo.title}
@
${demo.category.name}
'
).
toList
(),
);
}
void
main
(
)
{
...
...
examples/flutter_gallery/test_driver/transitions_perf_test.dart
View file @
b0fa93ea
...
...
@@ -51,16 +51,10 @@ const List<String> kSkippedDemos = const <String>[
// All of the gallery demos, identified as "title@category".
//
// These names are reported by the test app
. See _handleMessages() in
// transitions_perf.dart.
// These names are reported by the test app
, see _handleMessages()
//
in
transitions_perf.dart.
List
<
String
>
_allDemos
=
<
String
>[];
// The height of the screen, in logical pixels.
//
// This is reported by the test app. See _handleMessages() in
// transition_perf.dart.
double
_mediaHeight
=
0.0
;
/// Extracts event data from [events] recorded by timeline, validates it, turns
/// it into a histogram, and saves to a JSON file.
Future
<
Null
>
saveDurationsHistogram
(
List
<
Map
<
String
,
dynamic
>>
events
,
String
outputPath
)
async
{
...
...
@@ -152,8 +146,7 @@ Future<Null> runDemos(List<String> demos, FlutterDriver driver) async {
currentDemoCategory
=
demoCategory
;
final
SerializableFinder
demoItem
=
find
.
text
(
demoName
);
final
double
scrollDistance
=
_mediaHeight
/
4.0
;
await
driver
.
scrollUntilVisible
(
demoList
,
demoItem
,
dyScroll:
-
scrollDistance
,
alignment:
0.5
);
await
driver
.
scrollUntilVisible
(
demoList
,
demoItem
,
dyScroll:
-
48.0
,
alignment:
0.5
);
for
(
int
i
=
0
;
i
<
2
;
i
+=
1
)
{
await
driver
.
tap
(
demoItem
);
// Launch the demo
...
...
@@ -189,10 +182,6 @@ void main([List<String> args = const <String>[]]) {
_allDemos
=
const
JsonDecoder
().
convert
(
await
driver
.
requestData
(
'demoNames'
));
if
(
_allDemos
.
isEmpty
)
throw
'no demo names found'
;
_mediaHeight
=
const
JsonDecoder
().
convert
(
await
driver
.
requestData
(
'mediaSize'
))[
'height'
];
if
(
_mediaHeight
<=
0.0
)
throw
'unable to determine media height'
;
});
tearDownAll
(()
async
{
...
...
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