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
15703fb9
Unverified
Commit
15703fb9
authored
Jan 28, 2021
by
Michael Goderbauer
Committed by
GitHub
Jan 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate some dev/ things to null-safety (#74861)
parent
2e7ab87a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
pubspec.yaml
dev/missing_dependency_tests/pubspec.yaml
+1
-1
pubspec.yaml
dev/tracing_tests/pubspec.yaml
+1
-1
default_streams_test.dart
dev/tracing_tests/test/default_streams_test.dart
+2
-2
image_cache_tracing_test.dart
dev/tracing_tests/test/image_cache_tracing_test.dart
+11
-11
image_painting_event_test.dart
dev/tracing_tests/test/image_painting_event_test.dart
+5
-5
No files found.
dev/missing_dependency_tests/pubspec.yaml
View file @
15703fb9
name
:
missing_dependency_tests
environment
:
sdk
:
"
>=2.
0.0-dev.68.
0
<3.0.0"
sdk
:
"
>=2.
12.0-
0
<3.0.0"
dependencies
:
flutter
:
...
...
dev/tracing_tests/pubspec.yaml
View file @
15703fb9
...
...
@@ -2,7 +2,7 @@ name: tracing_tests
description
:
Various tests for tracing in flutter/flutter
environment
:
sdk
:
"
>=2.
2.2
<3.0.0"
sdk
:
"
>=2.
12.0-0
<3.0.0"
dependencies
:
flutter
:
...
...
dev/tracing_tests/test/default_streams_test.dart
View file @
15703fb9
...
...
@@ -12,7 +12,7 @@ import 'package:vm_service/vm_service_io.dart';
// for "Dart", "Embedder", and "GC" recorded from startup.
void
main
(
)
{
VmService
vmService
;
late
VmService
vmService
;
setUpAll
(()
async
{
final
developer
.
ServiceProtocolInfo
info
=
await
developer
.
Service
.
getInfo
();
...
...
@@ -22,7 +22,7 @@ void main() {
}
vmService
=
await
vmServiceConnectUri
(
'ws://localhost:
${info.serverUri
.port}${info.serverUri
.path}
ws'
,
'ws://localhost:
${info.serverUri
!.port}${info.serverUri!
.path}
ws'
,
);
});
...
...
dev/tracing_tests/test/image_cache_tracing_test.dart
View file @
15703fb9
...
...
@@ -12,8 +12,8 @@ import 'package:vm_service/vm_service.dart';
import
'package:vm_service/vm_service_io.dart'
;
void
main
(
)
{
VmService
vmService
;
String
isolateId
;
late
VmService
vmService
;
late
String
isolateId
;
setUpAll
(()
async
{
final
developer
.
ServiceProtocolInfo
info
=
await
developer
.
Service
.
getInfo
();
...
...
@@ -21,9 +21,9 @@ void main() {
fail
(
'This test _must_ be run with --enable-vmservice.'
);
}
vmService
=
await
vmServiceConnectUri
(
'ws://localhost:
${info.serverUri
.port}${info.serverUri
.path}
ws'
);
vmService
=
await
vmServiceConnectUri
(
'ws://localhost:
${info.serverUri
!.port}${info.serverUri!
.path}
ws'
);
await
vmService
.
setVMTimelineFlags
(<
String
>[
'Dart'
]);
isolateId
=
developer
.
Service
.
getIsolateID
(
isolate
.
Isolate
.
current
);
isolateId
=
developer
.
Service
.
getIsolateID
(
isolate
.
Isolate
.
current
)
!
;
// Initialize the image cache.
TestWidgetsFlutterBinding
.
ensureInitialized
();
...
...
@@ -32,22 +32,22 @@ void main() {
test
(
'Image cache tracing'
,
()
async
{
final
TestImageStreamCompleter
completer1
=
TestImageStreamCompleter
();
final
TestImageStreamCompleter
completer2
=
TestImageStreamCompleter
();
PaintingBinding
.
instance
.
imageCache
.
putIfAbsent
(
PaintingBinding
.
instance
!.
imageCache
!
.
putIfAbsent
(
'Test'
,
()
=>
completer1
,
);
PaintingBinding
.
instance
.
imageCache
.
clear
();
PaintingBinding
.
instance
!.
imageCache
!
.
clear
();
completer2
.
testSetImage
(
ImageInfo
(
image:
await
createTestImage
()));
PaintingBinding
.
instance
.
imageCache
.
putIfAbsent
(
PaintingBinding
.
instance
!.
imageCache
!
.
putIfAbsent
(
'Test2'
,
()
=>
completer2
,
);
PaintingBinding
.
instance
.
imageCache
.
evict
(
'Test2'
);
PaintingBinding
.
instance
!.
imageCache
!
.
evict
(
'Test2'
);
final
Timeline
timeline
=
await
vmService
.
getVMTimeline
();
_expectTimelineEvents
(
timeline
.
traceEvents
,
timeline
.
traceEvents
!
,
<
Map
<
String
,
dynamic
>>[
<
String
,
dynamic
>{
'name'
:
'ImageCache.putIfAbsent'
,
...
...
@@ -83,9 +83,9 @@ void main() {
void
_expectTimelineEvents
(
List
<
TimelineEvent
>
events
,
List
<
Map
<
String
,
dynamic
>>
expected
)
{
for
(
final
TimelineEvent
event
in
events
)
{
for
(
int
index
=
0
;
index
<
expected
.
length
;
index
+=
1
)
{
if
(
expected
[
index
][
'name'
]
==
event
.
json
[
'name'
])
{
if
(
expected
[
index
][
'name'
]
==
event
.
json
!
[
'name'
])
{
final
Map
<
String
,
dynamic
>
expectedArgs
=
expected
[
index
][
'args'
]
as
Map
<
String
,
dynamic
>;
final
Map
<
String
,
dynamic
>
args
=
event
.
json
[
'args'
]
as
Map
<
String
,
dynamic
>;
final
Map
<
String
,
dynamic
>
args
=
event
.
json
!
[
'args'
]
as
Map
<
String
,
dynamic
>;
if
(
_mapsEqual
(
expectedArgs
,
args
))
{
expected
.
removeAt
(
index
);
}
...
...
dev/tracing_tests/test/image_painting_event_test.dart
View file @
15703fb9
...
...
@@ -14,8 +14,8 @@ import 'package:vm_service/vm_service.dart';
import
'package:vm_service/vm_service_io.dart'
;
void
main
(
)
{
VmService
vmService
;
LiveTestWidgetsFlutterBinding
binding
;
late
VmService
vmService
;
late
LiveTestWidgetsFlutterBinding
binding
;
setUpAll
(()
async
{
final
developer
.
ServiceProtocolInfo
info
=
await
developer
.
Service
.
getInfo
();
...
...
@@ -24,7 +24,7 @@ void main() {
fail
(
'This test _must_ be run with --enable-vmservice.'
);
}
vmService
=
await
vmServiceConnectUri
(
'ws://localhost:
${info.serverUri
.port}${info.serverUri
.path}
ws'
);
vmService
=
await
vmServiceConnectUri
(
'ws://localhost:
${info.serverUri
!.port}${info.serverUri!
.path}
ws'
);
await
vmService
.
streamListen
(
EventStreams
.
kExtension
);
// Initialize bindings
...
...
@@ -72,7 +72,7 @@ void main() {
final
Event
event
=
await
completer
.
future
;
expect
(
event
.
extensionKind
,
'Flutter.ImageSizesForFrame'
);
expect
(
jsonEncode
(
event
.
extensionData
.
data
),
jsonEncode
(
event
.
extensionData
!
.
data
),
'{"test.png":{"source":"test.png","displaySize":{"width":200.0,"height":100.0},"imageSize":{"width":300.0,"height":300.0},"displaySizeInBytes":106666,"decodedSizeInBytes":480000}}'
,
);
},
skip:
isBrowser
);
// uses dart:isolate and io
...
...
@@ -101,7 +101,7 @@ void main() {
final
Event
event
=
await
completer
.
future
;
expect
(
event
.
extensionKind
,
'Flutter.ImageSizesForFrame'
);
expect
(
jsonEncode
(
event
.
extensionData
.
data
),
jsonEncode
(
event
.
extensionData
!
.
data
),
'{"test.png":{"source":"test.png","displaySize":{"width":300.0,"height":300.0},"imageSize":{"width":300.0,"height":300.0},"displaySizeInBytes":480000,"decodedSizeInBytes":480000}}'
,
);
},
skip:
isBrowser
);
// uses dart:isolate and io
...
...
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