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
a1fa1a3d
Commit
a1fa1a3d
authored
Jan 22, 2020
by
Mouad Debbar
Committed by
Jonah Williams
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[web] Wire the "--start-paused" flag correctly for web (#49310)
parent
4fd19aa1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
2 deletions
+35
-2
flutter_web_platform.dart
...ages/flutter_tools/lib/src/test/flutter_web_platform.dart
+7
-2
runner.dart
packages/flutter_tools/lib/src/test/runner.dart
+3
-0
test_test.dart
...flutter_tools/test/commands.shard/hermetic/test_test.dart
+25
-0
No files found.
packages/flutter_tools/lib/src/test/flutter_web_platform.dart
View file @
a1fa1a3d
...
...
@@ -83,12 +83,13 @@ class FlutterWebPlatform extends PlatformPlugin {
FlutterProject
flutterProject
,
String
shellPath
,
bool
updateGoldens
=
false
,
bool
pauseAfterLoad
=
false
,
})
async
{
final
shelf_io
.
IOServer
server
=
shelf_io
.
IOServer
(
await
HttpMultiServer
.
loopback
(
0
));
return
FlutterWebPlatform
.
_
(
server
,
Configuration
.
current
,
Configuration
.
current
.
change
(
pauseAfterLoad:
pauseAfterLoad
)
,
root
,
flutterProject:
flutterProject
,
shellPath:
shellPath
,
...
...
@@ -339,6 +340,7 @@ class FlutterWebPlatform extends PlatformPlugin {
browser
,
hostUrl
,
completer
.
future
,
headless:
!
_config
.
pauseAfterLoad
,
);
// Store null values for browsers that error out so we know not to load them
...
...
@@ -587,6 +589,8 @@ class BrowserManager {
/// [future]. If [debug] is true, starts the browser in debug mode, with its
/// debugger interfaces on and detected.
///
/// The browser will start in headless mode if [headless] is true.
///
/// The [settings] indicate how to invoke this browser's executable.
///
/// Returns the browser manager, or throws an [ApplicationException] if a
...
...
@@ -596,9 +600,10 @@ class BrowserManager {
Uri
url
,
Future
<
WebSocketChannel
>
future
,
{
bool
debug
=
false
,
bool
headless
=
true
,
})
async
{
final
Chrome
chrome
=
await
chromeLauncher
.
launch
(
url
.
toString
(),
headless:
true
);
await
chromeLauncher
.
launch
(
url
.
toString
(),
headless:
headless
);
final
Completer
<
BrowserManager
>
completer
=
Completer
<
BrowserManager
>();
...
...
packages/flutter_tools/lib/src/test/runner.dart
View file @
a1fa1a3d
...
...
@@ -56,6 +56,8 @@ Future<int> runTests(
final
List
<
String
>
testArgs
=
<
String
>[
if
(!
globals
.
terminal
.
supportsColor
)
'--no-color'
,
if
(
startPaused
)
'--pause-after-load'
,
if
(
machine
)
...<
String
>[
'-r'
,
'json'
]
else
...
...
@@ -96,6 +98,7 @@ Future<int> runTests(
updateGoldens:
updateGoldens
,
shellPath:
shellPath
,
flutterProject:
flutterProject
,
pauseAfterLoad:
startPaused
,
);
},
);
...
...
packages/flutter_tools/test/commands.shard/hermetic/test_test.dart
View file @
a1fa1a3d
...
...
@@ -48,6 +48,31 @@ void main() {
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
Cache:
()
=>
FakeCache
(),
});
testUsingContext
(
'Pipes start-paused to package:test'
,
()
async
{
final
FakePackageTest
fakePackageTest
=
FakePackageTest
();
final
TestCommand
testCommand
=
TestCommand
(
testWrapper:
fakePackageTest
);
final
CommandRunner
<
void
>
commandRunner
=
createTestCommandRunner
(
testCommand
);
await
commandRunner
.
run
(
const
<
String
>[
'test'
,
'--no-pub'
,
'--start-paused'
,
'--'
,
'test/fake_test.dart'
,
]);
expect
(
fakePackageTest
.
lastArgs
,
contains
(
'--pause-after-load'
),
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fs
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
Cache:
()
=>
FakeCache
(),
});
}
class
FakePackageTest
implements
TestWrapper
{
...
...
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