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
7da3ab63
Commit
7da3ab63
authored
Dec 05, 2016
by
Jason Simmons
Committed by
GitHub
Dec 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Devicelab memory usage test that navigates repeatedly to a screen within Gallery (#7137)
parent
7034a03c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
0 deletions
+68
-0
flutter_gallery__memory_nav.dart
dev/devicelab/bin/tasks/flutter_gallery__memory_nav.dart
+12
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+8
-0
manifest.yaml
dev/devicelab/manifest.yaml
+6
-0
memory_nav.dart
examples/flutter_gallery/test_driver/memory_nav.dart
+11
-0
memory_nav_test.dart
examples/flutter_gallery/test_driver/memory_nav_test.dart
+31
-0
No files found.
dev/devicelab/bin/tasks/flutter_gallery__memory_nav.dart
0 → 100644
View file @
7da3ab63
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
Future
<
Null
>
main
()
async
{
await
task
(
createGalleryNavigationMemoryTest
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
7da3ab63
...
...
@@ -52,6 +52,14 @@ TaskFunction createHelloWorldMemoryTest() {
);
}
TaskFunction
createGalleryNavigationMemoryTest
(
)
{
return
new
MemoryTest
(
'
${flutterDirectory.path}
/examples/flutter_gallery'
,
'io.flutter.examples.gallery'
,
testTarget:
'test_driver/memory_nav.dart'
,
);
}
/// Measure application startup performance.
class
StartupTest
{
static
const
Duration
_startupTimeout
=
const
Duration
(
minutes:
2
);
...
...
dev/devicelab/manifest.yaml
View file @
7da3ab63
...
...
@@ -121,6 +121,12 @@ tasks:
stage
:
devicelab
required_agent_capabilities
:
[
"
has-android-device"
]
flutter_gallery__memory_nav
:
description
:
>
Measures memory usage after repeated navigation in Gallery.
stage
:
devicelab
required_agent_capabilities
:
[
"
has-android-device"
]
# iOS on-device tests
...
...
examples/flutter_gallery/test_driver/memory_nav.dart
0 → 100644
View file @
7da3ab63
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter_driver/driver_extension.dart'
;
import
'package:flutter_gallery/main.dart'
as
app
;
void
main
(
)
{
enableFlutterDriverExtension
();
app
.
main
();
}
examples/flutter_gallery/test_driver/memory_nav_test.dart
0 → 100644
View file @
7da3ab63
import
'dart:async'
;
import
'package:flutter_driver/flutter_driver.dart'
;
import
'package:test/test.dart'
;
void
main
(
)
{
group
(
'flutter gallery transitions'
,
()
{
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
if
(
driver
!=
null
)
await
driver
.
close
();
});
test
(
'navigation'
,
()
async
{
SerializableFinder
menuItem
=
find
.
text
(
'Text fields'
);
await
driver
.
scrollIntoView
(
menuItem
);
await
new
Future
<
Null
>.
delayed
(
new
Duration
(
milliseconds:
500
));
for
(
int
i
=
0
;
i
<
15
;
i
++)
{
await
driver
.
tap
(
menuItem
);
await
new
Future
<
Null
>.
delayed
(
new
Duration
(
milliseconds:
1000
));
await
driver
.
tap
(
find
.
byTooltip
(
'Back'
));
await
new
Future
<
Null
>.
delayed
(
new
Duration
(
milliseconds:
1000
));
}
},
timeout:
new
Timeout
(
new
Duration
(
minutes:
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