|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by hidehiko Modified:
3 years, 10 months ago CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, yusukes+watch_chromium.org, tfarina, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, sync-reviews_chromium.org, Matt Giuca Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd DCHECK to make sure Profile instance is same.
The Profile instance owned by ArcAppListPrefs and
ArcSessionManager::profile() must be same.
This CL adds the DCHECK.
During the test, it turned out that ARC is enabled for
unexpected tests.
As a result, ArcAppListPrefs is expected to be alive at most
one instance (for Primary user Profile), but many instances
are created. Such tests are not designed to use ARC,
so disable ARC for them to pass them.
The command_line flag is moved from sync_arc_package_helper.cc.
However, tests using sync_arc_package_helper are currently
failing (crbug.com/694261), and redesign looks needed.
Thus, this CL leaves those tests as is. In future, probably
with fixing the bug, the flag needs to be added there.
BUG=694261
BUG=657687
BUG=b/31079732
TEST=Ran trybots.
Review-Url: https://codereview.chromium.org/2708693002
Cr-Commit-Position: refs/heads/master@{#452366}
Committed: https://chromium.googlesource.com/chromium/src/+/653559e3d446669fe50661afb09ffdc464a37c5c
Patch Set 1 #
Messages
Total messages: 21 (10 generated)
The CQ bit was checked by hidehiko@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
hidehiko@chromium.org changed reviewers: + skym@chromium.org, xiyuan@chromium.org, yusukes@chromium.org
While testing crrev.com/2702723002, I found a corner case. To split the concept from it, I created another CL (this) focusing on the bug fix. PTAL. yusukes@: ARC expert. xiyuan@: c/b/ui/app_list OWNER. skym@: c/b/sync OWNER. CC: lgchen@ whose is the original author of sync_arc_package_helper, and its clients. Thank you for review in advance, - hidehiko
lgtm
Description was changed from ========== Add DCHECK to make sure Profile instance is same. The Profile instance owned by ArcAppListPrefs and ArcSessionManager::profile() must be same. This CL adds the DCHECK. During the test, it turned out that ARC is enabled for unexpected tests. As a result, ArcAppListPrefs is expected to be alive at most one instance (for Primary user Profile), but many instances are created. Such tests are not designed to use ARC, so disable ARC for them to pass them. The command_line flag is moved from sync_arc_package_helper.cc. However, tests using sync_arc_package_helper are currently failing (crbug.com/694261), and redesign looks needed. Thus, this CL leaves those tests as is. In future, probably with fixing the bug, the flag needs to be added there. BUG=694261 BUG=657687 BUG=b/31079732 TEST=Ran trybots. ========== to ========== Add DCHECK to make sure Profile instance is same. The Profile instance owned by ArcAppListPrefs and ArcSessionManager::profile() must be same. This CL adds the DCHECK. During the test, it turned out that ARC is enabled for unexpected tests. As a result, ArcAppListPrefs is expected to be alive at most one instance (for Primary user Profile), but many instances are created. Such tests are not designed to use ARC, so disable ARC for them to pass them. The command_line flag is moved from sync_arc_package_helper.cc. However, tests using sync_arc_package_helper are currently failing (crbug.com/694261), and redesign looks needed. Thus, this CL leaves those tests as is. In future, probably with fixing the bug, the flag needs to be added there. BUG=694261 BUG=657687 BUG=b/31079732 TEST=Ran trybots. ==========
lgcheng@google.com changed reviewers: + lhchavez@chromium.org
+ Luis I think we intentionally make ArcAppListPrefs non-singleton to support SyncTest infrastructure.
On 2017/02/21 17:30:26, lgcheng wrote: > + Luis > > I think we intentionally make ArcAppListPrefs non-singleton to support SyncTest > infrastructure. Thank you for comment. This CL focuses just fixing SyncTest tests without ARC. And, it is out of focus to fix ARC SyncTest tests, because they are broken by another reason. Note: If SyncTest requires to create multiple ArcAppListPrefs instances, we should remove the assumption that ArcAppListPrefs::profile_ is as same as ASM::profile(), I think.
c/b/sync lgtm The TwoClient* sync integration tests do require that multiple profiles are running in the same Chrome process. I don't quite follow all of the ARC specific details going on here, but I think in general it'd be better to have profile scoped services, and not global singletons. Sync itself only wants to deal with data that's scoped to a single profile anyways, which is why we're typically able to fake multiple devices by using multiple profiles in these tests.
On 2017/02/21 19:14:43, skym wrote: > c/b/sync lgtm > > The TwoClient* sync integration tests do require that multiple profiles are > running in the same Chrome process. I don't quite follow all of the ARC specific > details going on here, but I think in general it'd be better to have profile > scoped services, and not global singletons. Sync itself only wants to deal with > data that's scoped to a single profile anyways, which is why we're typically > able to fake multiple devices by using multiple profiles in these tests. Alternatively you could remove the TwoClientArc* tests, or we could add a mechanism to run when we're not in E2E mode, but I think this is less than ideal.
lgtm
(sorry for the delay. Monday was a US holiday.)
Thank you for review. Submitting. > The TwoClient* sync integration tests do require that multiple profiles are > running in the same Chrome process. I don't quite follow all of the ARC specific > details going on here, but I think in general it'd be better to have profile > scoped services, and not global singletons. Sync itself only wants to deal with > data that's scoped to a single profile anyways, which is why we're typically > able to fake multiple devices by using multiple profiles in these tests. > Alternatively you could remove the TwoClientArc* tests, or we could add a > mechanism to run when we're not in E2E mode, but I think this is less than > ideal. Thank you very much for advice. lgcheng@, could you take a look at it as part of crbug.com/694261? I'm familiar with ARC instance stuff, but not very familiar with the tests. So I'd appreciate if you can work on it. Note: ARC is designed to be system global singleton, and users other than primary user cannot use it, considering the container communication. If multiple ArcAppListPrefs instances are needed for the test, it may be needed to define the behavior for the ArcAppListPrefs instance tied to non-ARC-allowed profile.
The CQ bit was checked by hidehiko@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 1, "attempt_start_ts": 1487815647019400, "parent_rev":
"bf7bc8e1a495e0c0168bf79e1303a2eadc41df10", "commit_rev":
"653559e3d446669fe50661afb09ffdc464a37c5c"}
Message was sent while issue was closed.
Description was changed from ========== Add DCHECK to make sure Profile instance is same. The Profile instance owned by ArcAppListPrefs and ArcSessionManager::profile() must be same. This CL adds the DCHECK. During the test, it turned out that ARC is enabled for unexpected tests. As a result, ArcAppListPrefs is expected to be alive at most one instance (for Primary user Profile), but many instances are created. Such tests are not designed to use ARC, so disable ARC for them to pass them. The command_line flag is moved from sync_arc_package_helper.cc. However, tests using sync_arc_package_helper are currently failing (crbug.com/694261), and redesign looks needed. Thus, this CL leaves those tests as is. In future, probably with fixing the bug, the flag needs to be added there. BUG=694261 BUG=657687 BUG=b/31079732 TEST=Ran trybots. ========== to ========== Add DCHECK to make sure Profile instance is same. The Profile instance owned by ArcAppListPrefs and ArcSessionManager::profile() must be same. This CL adds the DCHECK. During the test, it turned out that ARC is enabled for unexpected tests. As a result, ArcAppListPrefs is expected to be alive at most one instance (for Primary user Profile), but many instances are created. Such tests are not designed to use ARC, so disable ARC for them to pass them. The command_line flag is moved from sync_arc_package_helper.cc. However, tests using sync_arc_package_helper are currently failing (crbug.com/694261), and redesign looks needed. Thus, this CL leaves those tests as is. In future, probably with fixing the bug, the flag needs to be added there. BUG=694261 BUG=657687 BUG=b/31079732 TEST=Ran trybots. Review-Url: https://codereview.chromium.org/2708693002 Cr-Commit-Position: refs/heads/master@{#452366} Committed: https://chromium.googlesource.com/chromium/src/+/653559e3d446669fe50661afb09f... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/653559e3d446669fe50661afb09f... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
