OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A complete set of unit tests for GaiaOAuthClient. | 5 // A complete set of unit tests for GaiaOAuthClient. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
13 #include "google_apis/gaia/gaia_oauth_client.h" | 13 #include "google_apis/gaia/gaia_oauth_client.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "net/http/http_status_code.h" | 16 #include "net/http/http_status_code.h" |
17 #include "net/url_request/test_url_fetcher_factory.h" | 17 #include "net/url_request/test_url_fetcher_factory.h" |
18 #include "net/url_request/url_fetcher_delegate.h" | 18 #include "net/url_request/url_fetcher_delegate.h" |
19 #include "net/url_request/url_request_status.h" | 19 #include "net/url_request/url_request_status.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 OAuthClientInfo client_info; | 267 OAuthClientInfo client_info; |
268 client_info.client_id = "test_client_id"; | 268 client_info.client_id = "test_client_id"; |
269 client_info.client_secret = "test_client_secret"; | 269 client_info.client_secret = "test_client_secret"; |
270 client_info.redirect_uri = "test_redirect_uri"; | 270 client_info.redirect_uri = "test_redirect_uri"; |
271 GaiaOAuthClient auth(kGaiaOAuth2Url, | 271 GaiaOAuthClient auth(kGaiaOAuth2Url, |
272 profile_.GetRequestContext()); | 272 profile_.GetRequestContext()); |
273 auth.GetUserInfo("access_token", 1, &delegate); | 273 auth.GetUserInfo("access_token", 1, &delegate); |
274 } | 274 } |
275 | 275 |
276 } // namespace gaia | 276 } // namespace gaia |
OLD | NEW |