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

Side by Side Diff: chrome/browser/chromeos/login/cookie_fetcher_unittest.cc

Issue 7121014: When a user logs into sync, the appropriate cookies are retrieved so that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Uploading after sync merge Created 9 years, 6 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/login/issue_response_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <errno.h> 5 #include <errno.h>
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/chromeos/login/client_login_response_handler.h" 9 #include "chrome/browser/chromeos/login/client_login_response_handler.h"
10 #include "chrome/browser/chromeos/login/cookie_fetcher.h" 10 #include "chrome/browser/chromeos/login/cookie_fetcher.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 std::string input("a\nb\n"); 175 std::string input("a\nb\n");
176 std::string expected("a&b&"); 176 std::string expected("a&b&");
177 expected.append(ClientLoginResponseHandler::kService); 177 expected.append(ClientLoginResponseHandler::kService);
178 178
179 scoped_ptr<URLFetcher> fetcher(handler.Handle(input, NULL)); 179 scoped_ptr<URLFetcher> fetcher(handler.Handle(input, NULL));
180 EXPECT_EQ(expected, handler.payload()); 180 EXPECT_EQ(expected, handler.payload());
181 } 181 }
182 182
183 TEST_F(CookieFetcherTest, IssueResponseHandlerTest) { 183 TEST_F(CookieFetcherTest, IssueResponseHandlerTest) {
184 IssueResponseHandler handler(NULL); 184 IssueResponseHandler handler(NULL);
185 std::string input("a\n"); 185 std::string expected(IssueResponseHandler::BuildTokenAuthUrlWithToken(
186 std::string expected(GaiaUrls::GetInstance()->token_auth_url()); 186 std::string("a\n")));
187 expected.append(input);
188 187
189 scoped_ptr<URLFetcher> fetcher(handler.Handle(input, NULL)); 188 scoped_ptr<URLFetcher> fetcher(handler.Handle(std::string("a\n"), NULL));
190 EXPECT_EQ(expected, handler.token_url()); 189 EXPECT_EQ(expected, handler.token_url());
191 } 190 }
192 191
193 } // namespace chromeos 192 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/login/issue_response_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698