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
df3fe587
Unverified
Commit
df3fe587
authored
Jul 16, 2021
by
Kaushik Iska
Committed by
GitHub
Jul 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate that min frame number is numeric (#86498)
parent
dacfda07
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
153 additions
and
0 deletions
+153
-0
.ci.yaml
.ci.yaml
+16
-0
TESTOWNERS
TESTOWNERS
+2
-0
integration_ui_frame_number.dart
dev/devicelab/bin/tasks/integration_ui_frame_number.dart
+12
-0
integration_ui_ios_frame_number.dart
dev/devicelab/bin/tasks/integration_ui_ios_frame_number.dart
+12
-0
integration_tests.dart
dev/devicelab/lib/tasks/integration_tests.dart
+7
-0
frame_number.dart
dev/integration_tests/ui/lib/frame_number.dart
+63
-0
frame_number_test.dart
dev/integration_tests/ui/test_driver/frame_number_test.dart
+38
-0
generated_plugin_registrant.cc
...nual_tests/windows/flutter/generated_plugin_registrant.cc
+2
-0
binding_test.dart
packages/integration_test/test/binding_test.dart
+1
-0
No files found.
.ci.yaml
View file @
df3fe587
...
@@ -1628,6 +1628,14 @@ targets:
...
@@ -1628,6 +1628,14 @@ targets:
["devicelab"]
["devicelab"]
scheduler
:
luci
scheduler
:
luci
-
name
:
Mac_android integration_ui_frame_number
builder
:
Mac_android integration_ui_frame_number
presubmit
:
false
properties
:
tags
:
>
["devicelab"]
scheduler
:
luci
-
name
:
Mac_android integration_ui_screenshot
-
name
:
Mac_android integration_ui_screenshot
builder
:
Mac_android integration_ui_screenshot
builder
:
Mac_android integration_ui_screenshot
presubmit
:
false
presubmit
:
false
...
@@ -1912,6 +1920,14 @@ targets:
...
@@ -1912,6 +1920,14 @@ targets:
["devicelab"]
["devicelab"]
scheduler
:
luci
scheduler
:
luci
-
name
:
Mac_ios integration_ui_ios_frame_number
builder
:
Mac_ios integration_ui_ios_frame_number
presubmit
:
false
properties
:
tags
:
>
["devicelab"]
scheduler
:
luci
-
name
:
Mac_ios integration_ui_ios_screenshot
-
name
:
Mac_ios integration_ui_ios_screenshot
builder
:
Mac_ios integration_ui_ios_screenshot
builder
:
Mac_ios integration_ui_ios_screenshot
presubmit
:
false
presubmit
:
false
...
...
TESTOWNERS
View file @
df3fe587
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
/dev/devicelab/bin/tasks/imagefiltered_transform_animation_perf__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/imagefiltered_transform_animation_perf__timeline_summary.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/integration_test_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_test_test.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_driver.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_driver.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_frame_number.dart @iskakaushik @flutter/engine
/dev/devicelab/bin/tasks/integration_ui_keyboard_resize.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_keyboard_resize.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_screenshot.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_screenshot.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_textfield.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_textfield.dart @zanderso @flutter/tool
...
@@ -126,6 +127,7 @@
...
@@ -126,6 +127,7 @@
/dev/devicelab/bin/tasks/hot_mode_dev_cycle_macos_target__benchmark.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/hot_mode_dev_cycle_macos_target__benchmark.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_test_test_ios.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/integration_test_test_ios.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/integration_ui_ios_driver.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_ios_driver.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_ios_frame_number.dart @iskakaushik @flutter/engine
/dev/devicelab/bin/tasks/integration_ui_ios_keyboard_resize.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/integration_ui_ios_keyboard_resize.dart @zanderso @flutter/engine
/dev/devicelab/bin/tasks/integration_ui_ios_screenshot.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_ios_screenshot.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_ios_textfield.dart @zanderso @flutter/tool
/dev/devicelab/bin/tasks/integration_ui_ios_textfield.dart @zanderso @flutter/tool
...
...
dev/devicelab/bin/tasks/integration_ui_frame_number.dart
0 → 100644
View file @
df3fe587
// Copyright 2014 The Flutter 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_devicelab/framework/devices.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createEndToEndFrameNumberTest
());
}
dev/devicelab/bin/tasks/integration_ui_ios_frame_number.dart
0 → 100644
View file @
df3fe587
// Copyright 2014 The Flutter 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_devicelab/framework/devices.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/integration_tests.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createEndToEndFrameNumberTest
());
}
dev/devicelab/lib/tasks/integration_tests.dart
View file @
df3fe587
...
@@ -92,6 +92,13 @@ TaskFunction createEndToEndKeyboardTest() {
...
@@ -92,6 +92,13 @@ TaskFunction createEndToEndKeyboardTest() {
);
);
}
}
TaskFunction
createEndToEndFrameNumberTest
(
)
{
return
DriverTest
(
'
${flutterDirectory.path}
/dev/integration_tests/ui'
,
'lib/frame_number.dart'
,
);
}
TaskFunction
createEndToEndDriverTest
(
)
{
TaskFunction
createEndToEndDriverTest
(
)
{
return
DriverTest
(
return
DriverTest
(
'
${flutterDirectory.path}
/dev/integration_tests/ui'
,
'
${flutterDirectory.path}
/dev/integration_tests/ui'
,
...
...
dev/integration_tests/ui/lib/frame_number.dart
0 → 100644
View file @
df3fe587
// Copyright 2014 The Flutter 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
'dart:math'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/scheduler.dart'
;
import
'package:flutter_driver/driver_extension.dart'
;
/// This application shows empty screen until first frame timings are acquired.
void
main
(
)
{
enableFlutterDriverExtension
();
final
Completer
<
List
<
FrameTiming
>>
completer
=
Completer
<
List
<
FrameTiming
>>();
SchedulerBinding
.
instance
!.
addTimingsCallback
((
List
<
FrameTiming
>
timings
)
{
completer
.
complete
(
timings
);
});
runApp
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
_FirstFrameTimings
(
completer:
completer
),
));
}
class
_FirstFrameTimings
extends
StatefulWidget
{
const
_FirstFrameTimings
({
Key
?
key
,
required
this
.
completer
,
})
:
super
(
key:
key
);
final
Completer
<
List
<
FrameTiming
>>
completer
;
@override
_FirstFrameTimingsState
createState
()
=>
_FirstFrameTimingsState
();
}
class
_FirstFrameTimingsState
extends
State
<
_FirstFrameTimings
>
{
int
?
_minFrameNumber
;
@override
Widget
build
(
BuildContext
context
)
{
widget
.
completer
.
future
.
then
(
_setMinFrameNumber
);
if
(
_minFrameNumber
!=
null
)
{
return
Text
(
_minFrameNumber
.
toString
(),
key:
const
Key
(
'minFrameNumber'
),
);
}
else
{
return
const
Text
(
'Waiting...'
);
}
}
void
_setMinFrameNumber
(
List
<
FrameTiming
>
timings
)
{
final
int
minFrameNumber
=
timings
.
map
((
FrameTiming
timing
)
=>
timing
.
frameNumber
)
.
reduce
(
min
);
setState
(()
{
_minFrameNumber
=
minFrameNumber
;
});
}
}
dev/integration_tests/ui/test_driver/frame_number_test.dart
0 → 100644
View file @
df3fe587
// Copyright 2014 The Flutter 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/flutter_driver.dart'
;
import
'package:test/test.dart'
hide
TypeMatcher
,
isInstanceOf
;
bool
_isNumeric
(
String
s
)
{
return
double
.
tryParse
(
s
)
!=
null
;
}
// Connect and disconnect from the empty app.
void
main
(
)
{
group
(
'FrameNumber'
,
()
{
late
FlutterDriver
driver
;
setUpAll
(()
async
{
driver
=
await
FlutterDriver
.
connect
();
});
tearDownAll
(()
async
{
await
driver
.
close
();
});
test
(
'minFrameNumber is numeric'
,
()
async
{
final
SerializableFinder
minFrameNumberFinder
=
find
.
byValueKey
(
'minFrameNumber'
);
await
driver
.
waitFor
(
minFrameNumberFinder
,
timeout:
const
Duration
(
seconds:
5
),
);
final
String
minFrameNumber
=
await
driver
.
getText
(
minFrameNumberFinder
);
// TODO(iskakaushik): enable the stronger check of _minFrameNumber == '1',
// once this is fixed. https://github.com/flutter/flutter/issues/86487
expect
(
_isNumeric
(
minFrameNumber
),
true
);
},
timeout:
Timeout
.
none
);
});
}
dev/manual_tests/windows/flutter/generated_plugin_registrant.cc
View file @
df3fe587
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
// Generated file. Do not edit.
// Generated file. Do not edit.
//
//
// clang-format off
#include "generated_plugin_registrant.h"
#include "generated_plugin_registrant.h"
...
...
packages/integration_test/test/binding_test.dart
View file @
df3fe587
...
@@ -72,6 +72,7 @@ Future<void> main() async {
...
@@ -72,6 +72,7 @@ Future<void> main() async {
testWidgets
(
'Test traceAction'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Test traceAction'
,
(
WidgetTester
tester
)
async
{
await
integrationBinding
.
enableTimeline
(
vmService:
fakeVM
);
await
integrationBinding
.
enableTimeline
(
vmService:
fakeVM
);
await
integrationBinding
.
traceAction
(()
async
{});
await
integrationBinding
.
traceAction
(()
async
{});
print
(
integrationBinding
.
reportData
);
expect
(
integrationBinding
.
reportData
,
isNotNull
);
expect
(
integrationBinding
.
reportData
,
isNotNull
);
expect
(
integrationBinding
.
reportData
!.
containsKey
(
'timeline'
),
true
);
expect
(
integrationBinding
.
reportData
!.
containsKey
(
'timeline'
),
true
);
expect
(
expect
(
...
...
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