Persist Chrome Default Directory#69921
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
jonahwilliams
left a comment
There was a problem hiding this comment.
This approach SGTM.
There is an existing test covering the copying logic: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/test/general.shard/web/chrome_test.dart#L204
You could update that just a tad with a file outside of the previous copy dirs to make sure this is covered
|
Updated the tests. PTAL. |
nit: you need to remove the trailing whitespace |
mdebbar
left a comment
There was a problem hiding this comment.
I'm assuming this doesn't have the same issues that made @jonahwilliams change it to a new random profile on every run. But it's not clear to me how. Could someone help me understand?
Chrome must be provided a custom user-data-dir to enable the remote debug port. If you reuse a data dir, Chrome will potentially "attach" to an existing Chrome instance and the remote debug port may silently fail. I believe that's what @jonahwilliams was trying to resolve. As far as I can tell, since we use a different data dir, Chrome will not "attach" to any existing instance and we won't run into debugging issues. |
Cache and restore the entire Chrome
Defaultdirectory across Flutter Tool runs. This ensures that cookies, history and logged in sites are maintained. Related to #53030.