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

Side by Side Diff: chrome/browser/sync/engine/net/gaia_authenticator_unittest.cc

Issue 251080: Sync: Remove pthreads from event_sys code. Remove asynch version of GaiaAuthe... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/engine/net/gaia_authenticator.h" 5 #include "chrome/browser/sync/engine/net/gaia_authenticator.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/sync/engine/net/http_return.h" 9 #include "chrome/browser/sync/engine/net/http_return.h"
10 #include "chrome/browser/sync/util/sync_types.h" 10 #include "chrome/browser/sync/util/sync_types.h"
(...skipping 16 matching lines...) Expand all
27 bool Post(const GURL& url, const string& post_body, 27 bool Post(const GURL& url, const string& post_body,
28 unsigned long* response_code, string* response_body) { 28 unsigned long* response_code, string* response_body) {
29 *response_code = RC_REQUEST_OK; 29 *response_code = RC_REQUEST_OK;
30 response_body->assign("body\n"); 30 response_body->assign("body\n");
31 return true; 31 return true;
32 } 32 }
33 }; 33 };
34 34
35 TEST(GaiaAuthenticatorTest, TestNewlineAtEndOfAuthTokenRemoved) { 35 TEST(GaiaAuthenticatorTest, TestNewlineAtEndOfAuthTokenRemoved) {
36 GaiaAuthMock mock_auth; 36 GaiaAuthMock mock_auth;
37 MessageLoop message_loop;
38 mock_auth.set_message_loop(&message_loop);
37 GaiaAuthenticator::AuthResults results; 39 GaiaAuthenticator::AuthResults results;
38 EXPECT_TRUE(mock_auth.IssueAuthToken(&results, "sid", true)); 40 EXPECT_TRUE(mock_auth.IssueAuthToken(&results, "sid", true));
39 EXPECT_EQ(0, results.auth_token.compare("body")); 41 EXPECT_EQ(0, results.auth_token.compare("body"));
40 } 42 }
41 43
42 } // namespace browser_sync 44 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/net/gaia_authenticator.cc ('k') | chrome/browser/sync/engine/net/server_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698