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
eead1efe
Unverified
Commit
eead1efe
authored
Sep 20, 2022
by
Christopher Fujino
Committed by
GitHub
Sep 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Fix type error in ChromiumDevice.startApp (#111935)
parent
3a1a2533
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
web_device.dart
packages/flutter_tools/lib/src/web/web_device.dart
+2
-2
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+1
-1
devices_test.dart
...es/flutter_tools/test/general.shard/web/devices_test.dart
+31
-0
No files found.
packages/flutter_tools/lib/src/web/web_device.dart
View file @
eead1efe
...
@@ -118,7 +118,7 @@ abstract class ChromiumDevice extends Device {
...
@@ -118,7 +118,7 @@ abstract class ChromiumDevice extends Device {
@override
@override
Future
<
LaunchResult
>
startApp
(
Future
<
LaunchResult
>
startApp
(
covariant
WebApplicationPackage
package
,
{
WebApplicationPackage
?
package
,
{
String
?
mainPath
,
String
?
mainPath
,
String
?
route
,
String
?
route
,
required
DebuggingOptions
debuggingOptions
,
required
DebuggingOptions
debuggingOptions
,
...
@@ -454,7 +454,7 @@ class WebServerDevice extends Device {
...
@@ -454,7 +454,7 @@ class WebServerDevice extends Device {
Future
<
String
>
get
sdkNameAndVersion
async
=>
'Flutter Tools'
;
Future
<
String
>
get
sdkNameAndVersion
async
=>
'Flutter Tools'
;
@override
@override
Future
<
LaunchResult
>
startApp
(
ApplicationPackage
package
,
{
Future
<
LaunchResult
>
startApp
(
ApplicationPackage
?
package
,
{
String
?
mainPath
,
String
?
mainPath
,
String
?
route
,
String
?
route
,
required
DebuggingOptions
debuggingOptions
,
required
DebuggingOptions
debuggingOptions
,
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
eead1efe
...
@@ -340,7 +340,7 @@ void main() {
...
@@ -340,7 +340,7 @@ void main() {
fakeVmServiceHost
=
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
kAttachExpectations
.
toList
());
FakeVmServiceHost
(
requests:
kAttachExpectations
.
toList
());
setupMocks
();
setupMocks
();
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'web'
,
'index.html'
)).
deleteSync
(
);
fileSystem
.
directory
(
'web'
).
deleteSync
(
recursive:
true
);
final
ResidentWebRunner
residentWebRunner
=
ResidentWebRunner
(
final
ResidentWebRunner
residentWebRunner
=
ResidentWebRunner
(
flutterDevice
,
flutterDevice
,
flutterProject:
flutterProject:
...
...
packages/flutter_tools/test/general.shard/web/devices_test.dart
View file @
eead1efe
...
@@ -112,6 +112,37 @@ void main() {
...
@@ -112,6 +112,37 @@ void main() {
expect
(
device
.
supportsRuntimeMode
(
BuildMode
.
jitRelease
),
false
);
expect
(
device
.
supportsRuntimeMode
(
BuildMode
.
jitRelease
),
false
);
});
});
testWithoutContext
(
'ChromiumDevice accepts null package'
,
()
async
{
final
MemoryFileSystem
fs
=
MemoryFileSystem
.
test
();
final
FakePlatform
platform
=
FakePlatform
();
final
FakeProcessManager
pm
=
FakeProcessManager
.
any
();
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
GoogleChromeDevice
device
=
GoogleChromeDevice
(
fileSystem:
fs
,
processManager:
pm
,
platform:
platform
,
chromiumLauncher:
ChromiumLauncher
(
fileSystem:
fs
,
platform:
platform
,
processManager:
pm
,
operatingSystemUtils:
FakeOperatingSystemUtils
(),
browserFinder:
findChromeExecutable
,
logger:
logger
,
),
logger:
logger
,
);
await
expectLater
(
()
=>
device
.
startApp
(
null
,
debuggingOptions:
DebuggingOptions
.
disabled
(
BuildInfo
.
debug
),
platformArgs:
<
String
,
Object
?>{
'uri'
:
'localhost:1234'
},
),
// The tool exit here is irrelevant, this test simply ensures ChromiumDevice.startApp
// will accept a null value for a package.
throwsToolExit
(
message:
'Failed to launch browser'
),
);
});
testWithoutContext
(
'Chrome device is listed when Chrome can be run'
,
()
async
{
testWithoutContext
(
'Chrome device is listed when Chrome can be run'
,
()
async
{
final
WebDevices
webDevices
=
WebDevices
(
final
WebDevices
webDevices
=
WebDevices
(
featureFlags:
TestFeatureFlags
(
isWebEnabled:
true
),
featureFlags:
TestFeatureFlags
(
isWebEnabled:
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