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
2779361b
Unverified
Commit
2779361b
authored
Nov 12, 2019
by
Jonah Williams
Committed by
GitHub
Nov 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure web-server does not force usage of dwds (#44744)
parent
3383b564
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
resident_web_runner.dart
...utter_tools/lib/src/build_runner/resident_web_runner.dart
+1
-1
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+18
-2
No files found.
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
2779361b
...
@@ -602,7 +602,7 @@ class _DwdsResidentWebRunner extends ResidentWebRunner {
...
@@ -602,7 +602,7 @@ class _DwdsResidentWebRunner extends ResidentWebRunner {
initializePlatform:
debuggingOptions
.
initializePlatform
,
initializePlatform:
debuggingOptions
.
initializePlatform
,
hostname:
debuggingOptions
.
hostname
,
hostname:
debuggingOptions
.
hostname
,
port:
debuggingOptions
.
port
,
port:
debuggingOptions
.
port
,
skipDwds:
device
is
WebServerDevice
||
!
debuggingOptions
.
buildInfo
.
isDebug
,
skipDwds:
device
.
device
is
WebServerDevice
||
!
debuggingOptions
.
buildInfo
.
isDebug
,
dartDefines:
dartDefines
,
dartDefines:
dartDefines
,
);
);
// When connecting to a browser, update the message with a seemsSlow notification
// When connecting to a browser, update the message with a seemsSlow notification
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
2779361b
...
@@ -48,6 +48,7 @@ void main() {
...
@@ -48,6 +48,7 @@ void main() {
MockChromeTab
mockChromeTab
;
MockChromeTab
mockChromeTab
;
MockWipConnection
mockWipConnection
;
MockWipConnection
mockWipConnection
;
MockWipDebugger
mockWipDebugger
;
MockWipDebugger
mockWipDebugger
;
bool
didSkipDwds
;
setUp
(()
{
setUp
(()
{
resetChromeForTesting
();
resetChromeForTesting
();
...
@@ -87,6 +88,7 @@ void main() {
...
@@ -87,6 +88,7 @@ void main() {
@required
String
port
,
@required
String
port
,
@required
List
<
String
>
dartDefines
,
@required
List
<
String
>
dartDefines
,
})
async
{
})
async
{
didSkipDwds
=
skipDwds
;
return
mockWebFs
;
return
mockWebFs
;
},
},
},
},
...
@@ -127,9 +129,9 @@ void main() {
...
@@ -127,9 +129,9 @@ void main() {
when
(
mockWipConnection
.
debugger
).
thenReturn
(
mockWipDebugger
);
when
(
mockWipConnection
.
debugger
).
thenReturn
(
mockWipDebugger
);
}
}
test
(
'runner with web server device does not support debugging'
,
()
=>
testbed
.
run
(()
{
test
(
'runner with web server device does not support debugging'
,
()
=>
testbed
.
run
(()
async
{
when
(
mockFlutterDevice
.
device
).
thenReturn
(
WebServerDevice
());
when
(
mockFlutterDevice
.
device
).
thenReturn
(
WebServerDevice
());
final
ResidentRunner
profileResidentWebRunner
=
residentWebRunner
=
DwdsWebRunnerFactory
().
createWebRunner
(
final
ResidentRunner
profileResidentWebRunner
=
DwdsWebRunnerFactory
().
createWebRunner
(
mockFlutterDevice
,
mockFlutterDevice
,
flutterProject:
FlutterProject
.
current
(),
flutterProject:
FlutterProject
.
current
(),
debuggingOptions:
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
),
debuggingOptions:
DebuggingOptions
.
enabled
(
BuildInfo
.
debug
),
...
@@ -145,6 +147,20 @@ void main() {
...
@@ -145,6 +147,20 @@ void main() {
expect
(
residentWebRunner
.
debuggingEnabled
,
true
);
expect
(
residentWebRunner
.
debuggingEnabled
,
true
);
}));
}));
test
(
'runner with web server device does not initialize dwds'
,
()
=>
testbed
.
run
(()
async
{
_setupMocks
();
when
(
mockFlutterDevice
.
device
).
thenReturn
(
WebServerDevice
());
final
Completer
<
DebugConnectionInfo
>
connectionInfoCompleter
=
Completer
<
DebugConnectionInfo
>();
unawaited
(
residentWebRunner
.
run
(
connectionInfoCompleter:
connectionInfoCompleter
,
));
await
connectionInfoCompleter
.
future
;
expect
(
didSkipDwds
,
true
);
}));
test
(
'profile does not supportsServiceProtocol'
,
()
=>
testbed
.
run
(()
{
test
(
'profile does not supportsServiceProtocol'
,
()
=>
testbed
.
run
(()
{
when
(
mockFlutterDevice
.
device
).
thenReturn
(
mockChromeDevice
);
when
(
mockFlutterDevice
.
device
).
thenReturn
(
mockChromeDevice
);
final
ResidentRunner
profileResidentWebRunner
=
DwdsWebRunnerFactory
().
createWebRunner
(
final
ResidentRunner
profileResidentWebRunner
=
DwdsWebRunnerFactory
().
createWebRunner
(
...
...
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