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

Issue 58093002: [sync] Serve fake OAuth2 tokens from python sync server (Closed)

Created:
7 years, 1 month ago by Raghu Simha
Modified:
7 years, 1 month ago
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org
Visibility:
Public.

Description

[sync] Serve fake OAuth2 tokens from python sync server This CL adds a new handler to the python sync server so it can serve fake OAuth2 tokens to chrome. It is meant to be used for manual testing with the python sync server, using the workflow described below: - Build the "run_sync_testserver" target. - Run the python sync server: "out/Debug/run_sync_testserver --port=8010" - Launch chrome, sign in, and set up sync - Re-launch chrome with "--lso-url=http://127.0.0.1:8010" Chrome will now fetch OAuth2 tokens from the fake gaia server. You may change the fake OAuth2 token returned by the python sync server on the fly via the setfakeoauth2token handler like so: http://127.0.0.1:8010/setfakeoauth2token?response_code=200&expires_in=2400&request_token=rt&access_token=at&token_type=Bearer You may skip or include any of the query params. Params that are skipped will remain unchanged. BUG=none TEST=Build and run the "run_sync_testserver" target. Test the /o/oauth2/token and /setfakeoauth2token handlers. R=pavely@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=233271

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Address feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -4 lines) Patch
M sync/tools/testserver/chromiumsync.py View 2 chunks +39 lines, -0 lines 0 comments Download
M sync/tools/testserver/sync_testserver.py View 1 3 chunks +66 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Raghu Simha
Pavel, please review. Thanks.
7 years, 1 month ago (2013-11-05 18:40:56 UTC) #1
pavely
On 2013/11/05 18:40:56, Raghu Simha wrote: > Pavel, please review. Thanks. lgtm with one comment
7 years, 1 month ago (2013-11-05 20:52:29 UTC) #2
pavely
https://codereview.chromium.org/58093002/diff/80001/sync/tools/testserver/sync_testserver.py File sync/tools/testserver/sync_testserver.py (right): https://codereview.chromium.org/58093002/diff/80001/sync/tools/testserver/sync_testserver.py#newcode458 sync/tools/testserver/sync_testserver.py:458: self.send_header('Content-Type', 'text/html') content-type should be application/json
7 years, 1 month ago (2013-11-05 20:52:38 UTC) #3
Raghu Simha
https://codereview.chromium.org/58093002/diff/80001/sync/tools/testserver/sync_testserver.py File sync/tools/testserver/sync_testserver.py (right): https://codereview.chromium.org/58093002/diff/80001/sync/tools/testserver/sync_testserver.py#newcode458 sync/tools/testserver/sync_testserver.py:458: self.send_header('Content-Type', 'text/html') On 2013/11/05 20:52:38, pavely wrote: > content-type ...
7 years, 1 month ago (2013-11-06 15:50:25 UTC) #4
Raghu Simha
7 years, 1 month ago (2013-11-06 15:56:25 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r233271 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698