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

Issue 2706343004: [Sync] Refactor SessionsSyncManager unit tests (Closed)

Created:
3 years, 10 months ago by Nicolas Zea
Modified:
3 years, 10 months ago
Reviewers:
skym
CC:
chromium-reviews, sync-reviews_chromium.org, Patrick Noland
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Refactor SessionsSyncManager unit tests Tests no longer rely on BrowserWithTestTestWindowTest, and instead inject all the relevant navigation events directly. This allows for much more control over what gets tested, and in particular allows for testing situations with multiple windows. As part of this cleanup, various helper methods were added to make the tests simpler and more readable. A couple outdated tests were also removed. Lastly, because there are no longer any content dependencies, the test was moved to components/sync_sessions, to live next to the code it's actually testing (SessionsSyncManager). BUG=639009, 671283 Review-Url: https://codereview.chromium.org/2706343004 Cr-Commit-Position: refs/heads/master@{#452320} Committed: https://chromium.googlesource.com/chromium/src/+/5bdcd6fff79307e080a87ee417960f2e2141dc24

Patch Set 1 #

Patch Set 2 : Move to components #

Total comments: 40

Patch Set 3 : Fix mobile compile #

Patch Set 4 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1045 lines, -3906 lines) Patch
M chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc View 1 1 chunk +0 lines, -2612 lines 0 comments Download
M chrome/test/BUILD.gn View 1 1 chunk +0 lines, -1 line 0 comments Download
M components/sync_sessions/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
A + components/sync_sessions/sessions_sync_manager_unittest.cc View 1 2 3 64 chunks +1044 lines, -1293 lines 0 comments Download

Messages

Total messages: 19 (13 generated)
Nicolas Zea
PTAL! https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc File components/sync_sessions/sessions_sync_manager_unittest.cc (left): https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc#oldcode955 components/sync_sessions/sessions_sync_manager_unittest.cc:955: TEST_F(SessionsSyncManagerTest, SwappedOutOnRestore) { This test was moved to ...
3 years, 10 months ago (2017-02-22 20:37:49 UTC) #6
skym
Awesome cleanup! lgtm https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc File components/sync_sessions/sessions_sync_manager_unittest.cc (right): https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc#newcode58 components/sync_sessions/sessions_sync_manager_unittest.cc:58: const base::Time kTime0 = base::Time::FromInternalValue(100); Is ...
3 years, 10 months ago (2017-02-22 22:25:22 UTC) #11
Nicolas Zea
Comments addressed! https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc File components/sync_sessions/sessions_sync_manager_unittest.cc (right): https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc#newcode58 components/sync_sessions/sessions_sync_manager_unittest.cc:58: const base::Time kTime0 = base::Time::FromInternalValue(100); On 2017/02/22 ...
3 years, 10 months ago (2017-02-22 22:58:41 UTC) #12
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/2706343004/60001
3 years, 10 months ago (2017-02-22 23:12:42 UTC) #15
skym
still lgtm https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc File components/sync_sessions/sessions_sync_manager_unittest.cc (right): https://codereview.chromium.org/2706343004/diff/20001/components/sync_sessions/sessions_sync_manager_unittest.cc#newcode102 components/sync_sessions/sessions_sync_manager_unittest.cc:102: testing::AssertionResult ChangeTypeMatches( On 2017/02/22 22:58:41, Nicolas Zea ...
3 years, 10 months ago (2017-02-22 23:17:26 UTC) #16
commit-bot: I haz the power
3 years, 10 months ago (2017-02-23 00:59:33 UTC) #19
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/5bdcd6fff79307e080a87ee41796...

Powered by Google App Engine
This is Rietveld 408576698