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

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

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 3 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) 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"
11 #include "chrome/browser/chromeos/login/issue_response_handler.h" 11 #include "chrome/browser/chromeos/login/issue_response_handler.h"
12 #include "chrome/browser/chromeos/login/mock_auth_response_handler.h" 12 #include "chrome/browser/chromeos/login/mock_auth_response_handler.h"
13 #include "chrome/common/net/gaia/gaia_urls.h" 13 #include "chrome/common/net/gaia/gaia_urls.h"
14 #include "chrome/test/base/testing_browser_process_test.h"
15 #include "chrome/test/base/testing_profile.h" 14 #include "chrome/test/base/testing_profile.h"
16 #include "content/browser/browser_thread.h" 15 #include "content/browser/browser_thread.h"
17 #include "content/common/url_fetcher.h" 16 #include "content/common/url_fetcher.h"
18 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
19 #include "net/url_request/url_request_status.h" 18 #include "net/url_request/url_request_status.h"
20 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
21 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
22 21
23 namespace chromeos { 22 namespace chromeos {
24 using ::testing::Return; 23 using ::testing::Return;
25 using ::testing::Invoke; 24 using ::testing::Invoke;
26 using ::testing::Unused; 25 using ::testing::Unused;
27 using ::testing::_; 26 using ::testing::_;
28 27
29 class CookieFetcherTest : public TestingBrowserProcessTest { 28 class CookieFetcherTest : public testing::Test {
30 public: 29 public:
31 CookieFetcherTest() 30 CookieFetcherTest()
32 : iat_url_(GaiaUrls::GetInstance()->issue_auth_token_url()), 31 : iat_url_(GaiaUrls::GetInstance()->issue_auth_token_url()),
33 ta_url_(GaiaUrls::GetInstance()->token_auth_url()), 32 ta_url_(GaiaUrls::GetInstance()->token_auth_url()),
34 client_login_data_("SID n' LSID"), 33 client_login_data_("SID n' LSID"),
35 token_("auth token"), 34 token_("auth token"),
36 ui_thread_(BrowserThread::UI, &message_loop_) { 35 ui_thread_(BrowserThread::UI, &message_loop_) {
37 } 36 }
38 37
39 const GURL iat_url_; 38 const GURL iat_url_;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 TEST_F(CookieFetcherTest, IssueResponseHandlerTest) { 183 TEST_F(CookieFetcherTest, IssueResponseHandlerTest) {
185 IssueResponseHandler handler(NULL); 184 IssueResponseHandler handler(NULL);
186 std::string expected(IssueResponseHandler::BuildTokenAuthUrlWithToken( 185 std::string expected(IssueResponseHandler::BuildTokenAuthUrlWithToken(
187 std::string("a\n"))); 186 std::string("a\n")));
188 187
189 scoped_ptr<URLFetcher> fetcher(handler.Handle(std::string("a\n"), 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

Powered by Google App Engine
This is Rietveld 408576698