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
0f365d3a
Unverified
Commit
0f365d3a
authored
Sep 10, 2019
by
Jonah Williams
Committed by
GitHub
Sep 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove dart dir chrome profile (#39934)
parent
399bb04e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
chrome.dart
packages/flutter_tools/lib/src/web/chrome.dart
+1
-5
chrome_test.dart
...ges/flutter_tools/test/general.shard/web/chrome_test.dart
+10
-1
No files found.
packages/flutter_tools/lib/src/web/chrome.dart
View file @
0f365d3a
...
...
@@ -79,11 +79,7 @@ class ChromeLauncher {
/// `skipCheck` does not attempt to make a devtools connection before returning.
Future
<
Chrome
>
launch
(
String
url
,
{
bool
headless
=
false
,
bool
skipCheck
=
false
})
async
{
final
String
chromeExecutable
=
findChromeExecutable
();
final
Directory
dataDir
=
fs
.
directory
(
'.dart_tool'
)
.
childDirectory
(
'chrome_profile'
);
if
(!
dataDir
.
existsSync
())
{
dataDir
.
createSync
(
recursive:
true
);
}
final
Directory
dataDir
=
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_tool_'
);
final
int
port
=
await
os
.
findFreePort
();
final
List
<
String
>
args
=
<
String
>[
chromeExecutable
,
...
...
packages/flutter_tools/test/general.shard/web/chrome_test.dart
View file @
0f365d3a
...
...
@@ -4,6 +4,7 @@
import
'dart:async'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/os.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/process_manager.dart'
;
...
...
@@ -22,10 +23,12 @@ void main() {
setUp
(()
{
final
MockPlatform
platform
=
MockPlatform
();
when
(
platform
.
isWindows
).
thenReturn
(
false
);
final
MockFileSystem
mockFileSystem
=
MockFileSystem
();
testbed
=
Testbed
(
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
MockProcessManager
(),
Platform:
()
=>
platform
,
OperatingSystemUtils:
()
=>
MockOperatingSystemUtils
(),
FileSystem:
()
=>
mockFileSystem
,
});
});
...
...
@@ -36,9 +39,13 @@ void main() {
when
(
platform
.
environment
).
thenReturn
(<
String
,
String
>{
kChromeEnvironment:
'example_chrome'
});
final
Directory
mockDirectory
=
MockDirectory
();
when
(
fs
.
systemTempDirectory
).
thenReturn
(
mockDirectory
);
when
(
mockDirectory
.
createTempSync
(
any
)).
thenReturn
(
mockDirectory
);
when
(
mockDirectory
.
path
).
thenReturn
(
'example'
);
when
(
processManager
.
start
(<
String
>[
'example_chrome'
,
'--user-data-dir=
.dart_tool/chrome_profi
le'
,
'--user-data-dir=
examp
le'
,
'--remote-debugging-port=1234'
,
'--disable-background-timer-throttling'
,
'--disable-extensions'
,
...
...
@@ -66,3 +73,5 @@ void main() {
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockPlatform
extends
Mock
implements
Platform
{}
class
MockOperatingSystemUtils
extends
Mock
implements
OperatingSystemUtils
{}
class
MockFileSystem
extends
Mock
implements
FileSystem
{}
class
MockDirectory
extends
Mock
implements
Directory
{}
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