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

Issue 4096004: PyAuto hooks for Sync in TestingAutomationProvider (Closed)

Created:
10 years, 1 month ago by Raghu Simha
Modified:
9 years, 7 months ago
CC:
chromium-reviews, John Grabowski, ben+cc_chromium.org, anantha, Nirnimesh, Paweł Hajdan Jr., ncarter (slow), idana, tim (not reviewing), stuartmorgan, Raghu Simha
Visibility:
Public.

Description

PyAuto hooks for Sync in TestingAutomationProvider This patch exposes hooks for sync in TestingAutomationProvider that the chrome pyauto test suite can use. It contains the following changes: - Partial revert of an earlier change to ProfileSyncServiceHarness. Some of its methods were made pure virtual, but this ended up being unnecessary. Also ripped out unnecessary code from LiveSyncTest. - Minor refactor of ProfileSyncServiceHarness to allow for scenarios where the browser is restarted. - A bunch of new methods in TestingAutomationProvider: SignInToSync, GetSyncInfo, AwaitSyncCycleCompletion, EnableSyncForDatatypes and DisableSyncForDatatypes. - A new method in model_type.h/cc called ModelTypeFromString. Required for automation. - New APIs in pyauto.py for sync. - New test suite sync.py with sample tests. BUG=53651, 60970, 56460, 61639 TEST=run pyauto sync tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64988

Patch Set 1 #

Patch Set 2 : Self review. #

Patch Set 3 : Fix warnings. #

Total comments: 14

Patch Set 4 : Debugging. #

Patch Set 5 : Debugging done. Feature work remaining. #

Patch Set 6 : More functionality. #

Patch Set 7 : Rebase; fix warnings. #

Total comments: 3

Patch Set 8 : Rebase; CR feedback; Fix linux build. #

Patch Set 9 : Rebase; Add restart functionality. #

Total comments: 4

Patch Set 10 : CR feedback. #

Patch Set 11 : More CR changes. #

Total comments: 2

Patch Set 12 : Rebase; Addressing final review comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+570 lines, -67 lines) Patch
M chrome/browser/automation/testing_automation_provider.h View 1 2 3 4 5 3 chunks +35 lines, -0 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +223 lines, -0 lines 0 comments Download
M chrome/browser/profile.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/profile.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/profile_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profile_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.h View 5 6 7 8 9 10 11 4 chunks +23 lines, -18 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_harness.cc View 5 6 7 8 9 10 11 8 chunks +64 lines, -22 lines 0 comments Download
M chrome/browser/sync/syncable/model_type.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/syncable/model_type.cc View 2 chunks +28 lines, -2 lines 0 comments Download
M chrome/test/functional/PYAUTO_TESTS View 1 2 3 5 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/functional/sync.py View 1 2 3 4 5 6 7 8 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/test/live_sync/live_sync_test.cc View 10 2 chunks +2 lines, -25 lines 0 comments Download
M chrome/test/pyautolib/pyauto.py View 1 2 3 4 5 6 7 8 1 chunk +118 lines, -0 lines 0 comments Download
M chrome/test/testing_profile.h View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/npapi/bindings/npapi.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Raghu Simha
Nirnimesh, please review. Note: You will need a sync username and password in order for ...
10 years, 1 month ago (2010-10-27 04:31:49 UTC) #1
Raghu Simha
+timsteele for TestingAutomationProvider methods.
10 years, 1 month ago (2010-10-27 05:05:47 UTC) #2
Nirnimesh
Thanks a ton for doing this. The testers are going to love these. http://codereview.chromium.org/4096004/diff/5001/6003 File ...
10 years, 1 month ago (2010-10-27 05:36:53 UTC) #3
Raghu Simha
Uploading an interim patch as I continue debugging. This isn't ready for a full review ...
10 years, 1 month ago (2010-10-28 19:44:56 UTC) #4
Raghu Simha
I've made all the changes suggested in last week's code review. I was able to ...
10 years, 1 month ago (2010-11-02 02:55:00 UTC) #5
Nirnimesh
Code I commented on LGTM http://codereview.chromium.org/4096004/diff/27001/28008 File chrome/test/functional/sync.py (right): http://codereview.chromium.org/4096004/diff/27001/28008#newcode8 chrome/test/functional/sync.py:8: import pprint move system ...
10 years, 1 month ago (2010-11-02 05:48:26 UTC) #6
Raghu Simha
Fixed some issues. Tim, please review. http://codereview.chromium.org/4096004/diff/27001/28008 File chrome/test/functional/sync.py (right): http://codereview.chromium.org/4096004/diff/27001/28008#newcode8 chrome/test/functional/sync.py:8: import pprint On ...
10 years, 1 month ago (2010-11-02 06:22:55 UTC) #7
Raghu Simha
Added functionality that supports signing in to sync, restarting the browser, and verifying that sync ...
10 years, 1 month ago (2010-11-03 00:33:03 UTC) #8
tim (not reviewing)
two nits with browser/sync changes http://codereview.chromium.org/4096004/diff/44001/37009 File chrome/browser/sync/profile_sync_service_harness.h (right): http://codereview.chromium.org/4096004/diff/44001/37009#newcode31 chrome/browser/sync/profile_sync_service_harness.h:31: explicit ProfileSyncServiceHarness(Profile* profile); the ...
10 years, 1 month ago (2010-11-03 21:02:44 UTC) #9
Raghu Simha
Tim: Changes made. Thanks for reviewing. http://codereview.chromium.org/4096004/diff/44001/37009 File chrome/browser/sync/profile_sync_service_harness.h (right): http://codereview.chromium.org/4096004/diff/44001/37009#newcode31 chrome/browser/sync/profile_sync_service_harness.h:31: explicit ProfileSyncServiceHarness(Profile* profile); ...
10 years, 1 month ago (2010-11-03 21:34:55 UTC) #10
Raghu Simha
Tim, please take another look. Made a final change as discussed during an in-person code ...
10 years, 1 month ago (2010-11-03 22:04:42 UTC) #11
tim (not reviewing)
LGTM, please see my last comment. http://codereview.chromium.org/4096004/diff/66001/67007 File chrome/browser/sync/profile_sync_service_harness.cc (right): http://codereview.chromium.org/4096004/diff/66001/67007#newcode108 chrome/browser/sync/profile_sync_service_harness.cc:108: Profile* profile) { ...
10 years, 1 month ago (2010-11-03 22:09:12 UTC) #12
Raghu Simha
10 years, 1 month ago (2010-11-03 22:29:13 UTC) #13
Thanks for the review. Will commit after trybots go green.

http://codereview.chromium.org/4096004/diff/66001/67007
File chrome/browser/sync/profile_sync_service_harness.cc (right):

http://codereview.chromium.org/4096004/diff/66001/67007#newcode108
chrome/browser/sync/profile_sync_service_harness.cc:108: Profile* profile) {
On 2010/11/03 22:09:12, timsteele wrote:
> I would probably add
> if (!profile->HasProfileSyncService()) {
>   NOTREACHED() << "Nothing to attach to!";
>   return NULL;
> }
> and a comment on the declaration mentioning the precondition.

Done.

Powered by Google App Engine
This is Rietveld 408576698