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

Issue 7461109: Allow sync integration tests to operate on multiple datatypes: Typed Urls (Closed)

Created:
9 years, 5 months ago by Raghu Simha
Modified:
9 years, 4 months ago
CC:
chromium-reviews, ncarter (slow), idana, tim (not reviewing), Paweł Hajdan Jr., braffert
Visibility:
Public.

Description

Allow sync integration tests to operate on multiple datatypes: Typed Urls The sync integration tests currently use a class hierarchy where the test classes for each datatype are subclasses of LiveSyncTest. While this design worked in the past, it allows tests to work with only one datatype at a time, and therefore doesn't allow us to test the interplay between datatypes. This patch is another in the series of patches that will move away from an inheritance model to one where test cases can operate on more than one datatype. It updates the Typed Urls datatype to the new model, and contains the following changes: - LiveTypedUrlsSyncTest is no longer a class that inherits from LiveSyncTest, but is now a namespace called typed_urls_helper, and contains a bunch of methods that perform various operations related to Typed Urls. - SingleClientLiveTypedUrlsSyncTest is renamed to SingleClientTypedUrlsSyncTest, and is a subclass of LiveSyncTest. It uses the methods in namespace typed_urls_helper by including its header file and attaching itself to the helper. In addition, bookmarks, preferences and autofill helpers and the SyncDatatypeHelper were originally implemented as static classes. Based on the code review feedback in this patch, they have been modified to the "functions-in-a-namespace" model similar to typed urls. This patch consists of those changes too. BUG=88510 TEST=sync_integration_tests, sync_performance_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=95862

Patch Set 1 : Rebase #

Patch Set 2 : Rebase #

Total comments: 10

Patch Set 3 : CR feedback; Rebase; Self review #

Patch Set 4 : Fix compile #

Patch Set 5 : using sync_datatype_helper #

Total comments: 8

Patch Set 6 : CR feedback; rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2091 lines, -2725 lines) Patch
M chrome/browser/autofill/personal_data_manager.h View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 chunks +7 lines, -7 lines 0 comments Download
M chrome/test/live_sync/autofill_helper.h View 1 2 1 chunk +68 lines, -76 lines 0 comments Download
M chrome/test/live_sync/autofill_helper.cc View 1 2 3 4 11 chunks +24 lines, -38 lines 0 comments Download
M chrome/test/live_sync/bookmarks_helper.h View 1 2 2 chunks +167 lines, -219 lines 0 comments Download
M chrome/test/live_sync/bookmarks_helper.cc View 1 2 3 4 17 chunks +225 lines, -257 lines 0 comments Download
M chrome/test/live_sync/live_sync_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
D chrome/test/live_sync/live_typed_urls_sync_test.h View 1 chunk +0 lines, -100 lines 0 comments Download
D chrome/test/live_sync/live_typed_urls_sync_test.cc View 1 chunk +0 lines, -172 lines 0 comments Download
M chrome/test/live_sync/many_client_bookmarks_sync_test.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/test/live_sync/many_client_preferences_sync_test.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/test/live_sync/migration_errors_test.cc View 1 2 9 chunks +35 lines, -32 lines 0 comments Download
M chrome/test/live_sync/multiple_client_bookmarks_sync_test.cc View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
D chrome/test/live_sync/multiple_client_live_typed_urls_sync_test.cc View 1 2 1 chunk +0 lines, -58 lines 0 comments Download
M chrome/test/live_sync/multiple_client_preferences_sync_test.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
A + chrome/test/live_sync/multiple_client_typed_urls_sync_test.cc View 1 2 2 chunks +17 lines, -3 lines 0 comments Download
M chrome/test/live_sync/performance/autofill_sync_perf_test.cc View 1 2 5 chunks +20 lines, -15 lines 0 comments Download
M chrome/test/live_sync/performance/bookmarks_sync_perf_test.cc View 1 2 3 4 5 4 chunks +26 lines, -21 lines 0 comments Download
M chrome/test/live_sync/performance/typed_urls_sync_perf_test.cc View 1 2 3 4 5 3 chunks +12 lines, -4 lines 0 comments Download
M chrome/test/live_sync/preferences_helper.h View 1 2 1 chunk +89 lines, -100 lines 0 comments Download
M chrome/test/live_sync/preferences_helper.cc View 1 2 3 4 8 chunks +30 lines, -48 lines 0 comments Download
M chrome/test/live_sync/single_client_bookmarks_sync_test.cc View 1 2 5 chunks +48 lines, -43 lines 0 comments Download
D chrome/test/live_sync/single_client_live_typed_urls_sync_test.cc View 1 chunk +0 lines, -32 lines 0 comments Download
M chrome/test/live_sync/single_client_preferences_sync_test.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
A + chrome/test/live_sync/single_client_typed_urls_sync_test.cc View 1 2 1 chunk +16 lines, -2 lines 0 comments Download
M chrome/test/live_sync/sync_datatype_helper.h View 1 2 3 4 5 1 chunk +9 lines, -17 lines 0 comments Download
M chrome/test/live_sync/sync_datatype_helper.cc View 1 2 3 4 5 1 chunk +14 lines, -12 lines 0 comments Download
M chrome/test/live_sync/sync_errors_test.cc View 1 2 1 chunk +9 lines, -10 lines 0 comments Download
M chrome/test/live_sync/two_client_autofill_sync_test.cc View 1 2 7 chunks +178 lines, -207 lines 0 comments Download
M chrome/test/live_sync/two_client_bookmarks_sync_test.cc View 1 2 23 chunks +719 lines, -808 lines 0 comments Download
D chrome/test/live_sync/two_client_live_typed_urls_sync_test.cc View 1 2 1 chunk +0 lines, -166 lines 0 comments Download
M chrome/test/live_sync/two_client_preferences_sync_test.cc View 1 2 25 chunks +205 lines, -192 lines 0 comments Download
A + chrome/test/live_sync/two_client_typed_urls_sync_test.cc View 1 2 6 chunks +21 lines, -9 lines 0 comments Download
A chrome/test/live_sync/typed_urls_helper.h View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
A + chrome/test/live_sync/typed_urls_helper.cc View 1 2 3 4 5 7 chunks +67 lines, -55 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Raghu Simha
Tim, please review. This patch is based on the changes in http://codereview.chromium.org/7259005. Thanks.
9 years, 5 months ago (2011-07-27 10:48:48 UTC) #1
Raghu Simha
Ping. Now that http://codereview.chromium.org/7259005 has been landed, this is ready to go.
9 years, 4 months ago (2011-07-28 11:26:12 UTC) #2
Raghu Simha
+atwilson as backup reviewer in case tim can't get to this today.
9 years, 4 months ago (2011-07-29 10:46:25 UTC) #3
Raghu Simha
Bumping this in the hope that someone gets to look at it on Monday :)
9 years, 4 months ago (2011-08-01 05:30:34 UTC) #4
Raghu Simha
Drew, you're it now. Thanks for the review.
9 years, 4 months ago (2011-08-02 21:04:35 UTC) #5
Andrew T Wilson (Slow)
Consider either making TypedUrlHelper and SyncDatatypeHelper into real objects, or else not making them classes ...
9 years, 4 months ago (2011-08-02 23:55:43 UTC) #6
Raghu Simha
Thanks for the review, Drew. I took a closer look at the style guide recommendations ...
9 years, 4 months ago (2011-08-05 00:47:53 UTC) #7
Andrew T Wilson (Slow)
LGTM with a few nits below. http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/sync_datatype_helper.cc File chrome/test/live_sync/sync_datatype_helper.cc (right): http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/sync_datatype_helper.cc#newcode12 chrome/test/live_sync/sync_datatype_helper.cc:12: LiveSyncTest* test_ = ...
9 years, 4 months ago (2011-08-07 02:39:51 UTC) #8
Raghu Simha
9 years, 4 months ago (2011-08-08 19:04:23 UTC) #9
Thanks for the feedback. I'll land this after the trybots go green.

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/sync_...
File chrome/test/live_sync/sync_datatype_helper.cc (right):

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/sync_...
chrome/test/live_sync/sync_datatype_helper.cc:12: LiveSyncTest* test_ = NULL;
On 2011/08/07 02:39:51, Andrew T Wilson wrote:
> should be static.
> 
> Also, I'm not sure about the naming of non-data-members with an underscore -
can
> you double-check the style guide to make sure this is correct?

Done. Renamed test_ to test and made it a static.

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/sync_...
File chrome/test/live_sync/sync_datatype_helper.h (right):

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/sync_...
chrome/test/live_sync/sync_datatype_helper.h:20: // Returns |test_| after making
sure it is a valid pointer.
On 2011/08/07 02:39:51, Andrew T Wilson wrote:
> This comment no longer makes sense now that there's no test_ data member.

Good catch. Fixed.

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/typed...
File chrome/test/live_sync/typed_urls_helper.cc (right):

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/typed...
chrome/test/live_sync/typed_urls_helper.cc:95: base::Time* timestamp_ = NULL;
On 2011/08/07 02:39:51, Andrew T Wilson wrote:
> Again, this should be static (so it's not accessible outside this file) and
also
> please check whether timestamp_ is correct for non-member variables.

Done.

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/typed...
File chrome/test/live_sync/typed_urls_helper.h (right):

http://codereview.chromium.org/7461109/diff/32001/chrome/test/live_sync/typed...
chrome/test/live_sync/typed_urls_helper.h:17: class HistoryService;
On 2011/08/07 02:39:51, Andrew T Wilson wrote:
> I don't think we need this forward decl of HistoryService any more.

Removed.

Powered by Google App Engine
This is Rietveld 408576698