Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Issue 2651883003: Clean up ARC file system unit tests. (Closed)

Created:
3 years, 11 months ago by Shuhei Takahashi
Modified:
3 years, 10 months ago
Reviewers:
hidehiko, hashimoto
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, yusukes+watch_chromium.org, tzik, hidehiko+watch_chromium.org, nhiroki, lhchavez+watch_chromium.org, oshima+watch_chromium.org, kinuko+fileapi, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up ARC file system unit tests. 1. Introduce a generic FakeFileSystemInstance. Tests that want to test ARC file system operations can use this fake without implementing its own FileSystemInstance. 2. Removed ArcFileSystemOperationRunner interface. Former ArcDeferredFileSystemOperationRunner is now the only implementation of the interface, so the interface is removed and ArcDeferredFSOpRunner is renamed to ArcFSOpRunner. 3. Inject FileSystemInstance rather than ArcFSOpRunner in unit tests. In unit tests, ArcFSOpRunner without deferring is created with ArcFSOpRunner::CreateForTesting() so that operations are passed through to FileSystemInstance. TEST=unit_tests BUG=chromium:683049 Review-Url: https://codereview.chromium.org/2651883003 Cr-Commit-Position: refs/heads/master@{#447480} Committed: https://chromium.googlesource.com/chromium/src/+/91afa75f31ca8fdfc901de32098ef729218de847

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : Fake FileSystemInstance, not ArcFileSystemOperationRunner. #

Total comments: 29

Patch Set 4 : Addressed comments. #

Total comments: 4

Patch Set 5 : Give up constexpr as per hashimoto's request. #

Total comments: 10

Patch Set 6 : Addressed hidehiko's comments. #

Total comments: 4

Patch Set 7 : Addressed hashimoto's comments. #

Patch Set 8 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+485 lines, -922 lines) Patch
M chrome/browser/chromeos/BUILD.gn View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_service_launcher.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc View 1 2 3 4 5 5 chunks +14 lines, -20 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc View 1 2 3 4 5 7 chunks +22 lines, -99 lines 0 comments Download
D chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.h View 1 2 1 chunk +0 lines, -99 lines 0 comments Download
D chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner.cc View 1 2 1 chunk +0 lines, -172 lines 0 comments Download
D chrome/browser/chromeos/arc/fileapi/arc_deferred_file_system_operation_runner_unittest.cc View 1 2 1 chunk +0 lines, -182 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc View 1 2 3 4 4 chunks +54 lines, -85 lines 0 comments Download
A + chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.h View 1 2 3 5 chunks +46 lines, -23 lines 0 comments Download
A + chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner.cc View 1 2 3 8 chunks +34 lines, -19 lines 0 comments Download
A + chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_unittest.cc View 1 2 3 9 chunks +31 lines, -35 lines 0 comments Download
M chrome/browser/chromeos/arc/fileapi/arc_file_system_operation_runner_util.cc View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M components/arc/BUILD.gn View 1 2 3 4 5 6 7 3 chunks +1 line, -4 lines 0 comments Download
D components/arc/file_system/arc_file_system_operation_runner.h View 1 2 1 chunk +0 lines, -55 lines 0 comments Download
D components/arc/file_system/arc_file_system_operation_runner.cc View 1 2 1 chunk +0 lines, -19 lines 0 comments Download
M components/arc/file_system/test/fake_arc_file_system_operation_runner.h View 1 2 1 chunk +0 lines, -37 lines 0 comments Download
M components/arc/file_system/test/fake_arc_file_system_operation_runner.cc View 1 2 1 chunk +0 lines, -43 lines 0 comments Download
M components/arc/test/fake_file_system_instance.h View 1 2 3 4 5 6 1 chunk +108 lines, -8 lines 0 comments Download
M components/arc/test/fake_file_system_instance.cc View 1 2 3 4 5 6 1 chunk +166 lines, -15 lines 0 comments Download

Messages

Total messages: 60 (35 generated)
Shuhei Takahashi
hidehiko, hashimoto: PTAL
3 years, 11 months ago (2017-01-24 08:03:38 UTC) #10
hashimoto
Sorry for not catching this in earlier reviews, but why do we need to have ...
3 years, 11 months ago (2017-01-24 08:26:11 UTC) #11
Shuhei Takahashi
On 2017/01/24 08:26:11, hashimoto wrote: > Sorry for not catching this in earlier reviews, but ...
3 years, 11 months ago (2017-01-24 08:32:21 UTC) #12
Shuhei Takahashi
On 2017/01/24 08:32:21, Shuhei Takahashi wrote: > On 2017/01/24 08:26:11, hashimoto wrote: > > Sorry ...
3 years, 11 months ago (2017-01-24 09:08:11 UTC) #13
Shuhei Takahashi
On 2017/01/24 09:08:11, Shuhei Takahashi wrote: > On 2017/01/24 08:32:21, Shuhei Takahashi wrote: > > ...
3 years, 11 months ago (2017-01-24 11:34:59 UTC) #14
hidehiko
tl;dr; How about - Use FakeFileSystemInstance mojom impl. - Merge ArcDeferredFileSystemOperationRunner impl into ArcFileSystemOperationRunner. (i.e. ...
3 years, 11 months ago (2017-01-24 14:05:16 UTC) #15
Shuhei Takahashi
I'm fine with hidehiko's plan. hashimoto, are you also okay with it? On 2017/01/24 14:05:16, ...
3 years, 11 months ago (2017-01-25 03:27:56 UTC) #16
hashimoto
On 2017/01/25 03:27:56, Shuhei Takahashi wrote: > I'm fine with hidehiko's plan. hashimoto, are you ...
3 years, 11 months ago (2017-01-25 03:37:59 UTC) #17
Shuhei Takahashi
Updated the change according to the discussion above. PTAL.
3 years, 11 months ago (2017-01-25 13:41:00 UTC) #24
hidehiko
Overall design looks good. It looks much simpler to me! https://codereview.chromium.org/2651883003/diff/40001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc File chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc (right): https://codereview.chromium.org/2651883003/diff/40001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc#newcode114 ...
3 years, 11 months ago (2017-01-26 07:24:21 UTC) #25
hashimoto
https://codereview.chromium.org/2651883003/diff/40001/components/arc/test/fake_file_system_instance.h File components/arc/test/fake_file_system_instance.h (right): https://codereview.chromium.org/2651883003/diff/40001/components/arc/test/fake_file_system_instance.h#newcode50 components/arc/test/fake_file_system_instance.h:50: constexpr FileSpec() : FileSpec(nullptr, nullptr, false) {} On 2017/01/26 ...
3 years, 11 months ago (2017-01-26 08:05:54 UTC) #26
Shuhei Takahashi
PTAL https://codereview.chromium.org/2651883003/diff/40001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc File chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc (right): https://codereview.chromium.org/2651883003/diff/40001/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc#newcode114 chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root_unittest.cc:114: kMusicSpec, kDupsSpec, kDup2Spec, On 2017/01/26 07:24:20, hidehiko wrote: ...
3 years, 11 months ago (2017-01-27 09:55:11 UTC) #31
hashimoto
https://codereview.chromium.org/2651883003/diff/40001/components/arc/test/fake_file_system_instance.h File components/arc/test/fake_file_system_instance.h (right): https://codereview.chromium.org/2651883003/diff/40001/components/arc/test/fake_file_system_instance.h#newcode50 components/arc/test/fake_file_system_instance.h:50: constexpr FileSpec() : FileSpec(nullptr, nullptr, false) {} On 2017/01/27 ...
3 years, 11 months ago (2017-01-27 10:46:50 UTC) #32
Shuhei Takahashi
PTAL On 2017/01/27 10:46:50, hashimoto wrote: > https://codereview.chromium.org/2651883003/diff/40001/components/arc/test/fake_file_system_instance.h > File components/arc/test/fake_file_system_instance.h (right): > > https://codereview.chromium.org/2651883003/diff/40001/components/arc/test/fake_file_system_instance.h#newcode50 ...
3 years, 10 months ago (2017-01-27 11:56:21 UTC) #35
hidehiko
For constexpr v.s. std::string, I'm fine with either way, as long as it works. So, ...
3 years, 10 months ago (2017-01-27 15:50:00 UTC) #38
Shuhei Takahashi
PTAL https://codereview.chromium.org/2651883003/diff/60001/components/arc/test/fake_file_system_instance.cc File components/arc/test/fake_file_system_instance.cc (right): https://codereview.chromium.org/2651883003/diff/60001/components/arc/test/fake_file_system_instance.cc#newcode63 components/arc/test/fake_file_system_instance.cc:63: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/01/27 15:50:00, hidehiko wrote: > This ...
3 years, 10 months ago (2017-01-30 02:27:36 UTC) #41
hashimoto
https://codereview.chromium.org/2651883003/diff/100001/components/arc/test/fake_file_system_instance.h File components/arc/test/fake_file_system_instance.h (right): https://codereview.chromium.org/2651883003/diff/100001/components/arc/test/fake_file_system_instance.h#newcode47 components/arc/test/fake_file_system_instance.h:47: YES, How about swapping the order (i.e. NO, YES) ...
3 years, 10 months ago (2017-01-30 03:29:11 UTC) #42
Shuhei Takahashi
PTAL https://codereview.chromium.org/2651883003/diff/100001/components/arc/test/fake_file_system_instance.h File components/arc/test/fake_file_system_instance.h (right): https://codereview.chromium.org/2651883003/diff/100001/components/arc/test/fake_file_system_instance.h#newcode61 components/arc/test/fake_file_system_instance.h:61: File(const File& rhs); On 2017/01/30 03:29:10, hashimoto wrote: ...
3 years, 10 months ago (2017-01-30 03:39:17 UTC) #43
hidehiko
lgtm https://codereview.chromium.org/2651883003/diff/100001/components/arc/test/fake_file_system_instance.h File components/arc/test/fake_file_system_instance.h (right): https://codereview.chromium.org/2651883003/diff/100001/components/arc/test/fake_file_system_instance.h#newcode61 components/arc/test/fake_file_system_instance.h:61: File(const File& rhs); On 2017/01/30 03:39:16, Shuhei Takahashi ...
3 years, 10 months ago (2017-01-30 05:21:57 UTC) #48
Shuhei Takahashi
hashimoto: Friendly ping just in case you missed this CL. But I'm not in hurry ...
3 years, 10 months ago (2017-02-01 06:15:58 UTC) #49
hashimoto
lgtm
3 years, 10 months ago (2017-02-01 06:27:49 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2651883003/120001
3 years, 10 months ago (2017-02-01 06:28:53 UTC) #52
commit-bot: I haz the power
Failed to apply patch for chrome/browser/chromeos/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-01 08:34:52 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2651883003/140001
3 years, 10 months ago (2017-02-01 08:56:47 UTC) #57
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 09:47:01 UTC) #60
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/91afa75f31ca8fdfc901de32098e...

Powered by Google App Engine
This is Rietveld 408576698