| OLD | NEW |
| 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/url_fetcher.h" | |
| 14 #include "chrome/test/testing_profile.h" | 13 #include "chrome/test/testing_profile.h" |
| 15 #include "content/browser/browser_thread.h" | 14 #include "content/browser/browser_thread.h" |
| 15 #include "content/common/url_fetcher.h" |
| 16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 17 #include "net/url_request/url_request_status.h" | 17 #include "net/url_request/url_request_status.h" |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 using ::testing::Return; | 22 using ::testing::Return; |
| 23 using ::testing::Invoke; | 23 using ::testing::Invoke; |
| 24 using ::testing::Unused; | 24 using ::testing::Unused; |
| 25 using ::testing::_; | 25 using ::testing::_; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 IssueResponseHandler handler(NULL); | 183 IssueResponseHandler handler(NULL); |
| 184 std::string input("a\n"); | 184 std::string input("a\n"); |
| 185 std::string expected(IssueResponseHandler::kTokenAuthUrl); | 185 std::string expected(IssueResponseHandler::kTokenAuthUrl); |
| 186 expected.append(input); | 186 expected.append(input); |
| 187 | 187 |
| 188 scoped_ptr<URLFetcher> fetcher(handler.Handle(input, NULL)); | 188 scoped_ptr<URLFetcher> fetcher(handler.Handle(input, NULL)); |
| 189 EXPECT_EQ(expected, handler.token_url()); | 189 EXPECT_EQ(expected, handler.token_url()); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace chromeos | 192 } // namespace chromeos |
| OLD | NEW |