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
b4f1d5a9
Unverified
Commit
b4f1d5a9
authored
Dec 14, 2018
by
Jonah Williams
Committed by
GitHub
Dec 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fuchsia devices to daemon command (#25344)
parent
4c24bcc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+2
-0
daemon_test.dart
packages/flutter_tools/test/commands/daemon_test.dart
+10
-0
No files found.
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
b4f1d5a9
...
...
@@ -19,6 +19,7 @@ import '../build_info.dart';
import
'../cache.dart'
;
import
'../device.dart'
;
import
'../emulator.dart'
;
import
'../fuchsia/fuchsia_device.dart'
;
import
'../globals.dart'
;
import
'../ios/devices.dart'
;
import
'../ios/simulators.dart'
;
...
...
@@ -567,6 +568,7 @@ class DeviceDomain extends Domain {
registerHandler
(
'forward'
,
forward
);
registerHandler
(
'unforward'
,
unforward
);
addDeviceDiscoverer
(
FuchsiaDevices
());
addDeviceDiscoverer
(
AndroidDevices
());
addDeviceDiscoverer
(
IOSDevices
());
addDeviceDiscoverer
(
IOSSimulators
());
...
...
packages/flutter_tools/test/commands/daemon_test.dart
View file @
b4f1d5a9
...
...
@@ -7,6 +7,7 @@ import 'dart:async';
import
'package:flutter_tools/src/android/android_workflow.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/commands/daemon.dart'
;
import
'package:flutter_tools/src/fuchsia/fuchsia_workflow.dart'
;
import
'package:flutter_tools/src/globals.dart'
;
import
'package:flutter_tools/src/ios/ios_workflow.dart'
;
import
'package:flutter_tools/src/resident_runner.dart'
;
...
...
@@ -197,6 +198,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
AndroidWorkflow:
()
=>
MockAndroidWorkflow
(
canListDevices:
false
),
IOSWorkflow:
()
=>
MockIOSWorkflow
(),
FuchsiaWorkflow:
()
=>
MockFuchsiaWorkflow
(),
});
testUsingContext
(
'device.getDevices should respond with list'
,
()
async
{
...
...
@@ -241,6 +243,7 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
AndroidWorkflow:
()
=>
MockAndroidWorkflow
(),
IOSWorkflow:
()
=>
MockIOSWorkflow
(),
FuchsiaWorkflow:
()
=>
MockFuchsiaWorkflow
(),
});
testUsingContext
(
'emulator.launch without an emulatorId should report an error'
,
()
async
{
...
...
@@ -303,6 +306,13 @@ bool _notEvent(Map<String, dynamic> map) => map['event'] == null;
bool
_isConnectedEvent
(
Map
<
String
,
dynamic
>
map
)
=>
map
[
'event'
]
==
'daemon.connected'
;
class
MockFuchsiaWorkflow
extends
FuchsiaWorkflow
{
MockFuchsiaWorkflow
({
this
.
canListDevices
=
true
});
@override
final
bool
canListDevices
;
}
class
MockAndroidWorkflow
extends
AndroidWorkflow
{
MockAndroidWorkflow
({
this
.
canListDevices
=
true
});
...
...
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