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

Side by Side Diff: chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc

Issue 7524033: Add a scoper object for URLFetcher::Factory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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 // A complete set of unit tests for GaiaOAuthFetcher. 5 // A complete set of unit tests for GaiaOAuthFetcher.
6 // Originally ported from GaiaAuthFetcher tests. 6 // Originally ported from GaiaAuthFetcher tests.
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "chrome/browser/net/chrome_cookie_notification_details.h" 12 #include "chrome/browser/net/chrome_cookie_notification_details.h"
13 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h" 13 #include "chrome/browser/net/gaia/gaia_oauth_consumer.h"
14 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h" 14 #include "chrome/browser/net/gaia/gaia_oauth_fetcher.h"
15 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
16 #include "chrome/common/net/gaia/google_service_auth_error.h" 16 #include "chrome/common/net/gaia/google_service_auth_error.h"
17 #include "chrome/common/net/http_return.h" 17 #include "chrome/common/net/http_return.h"
18 #include "chrome/test/testing_profile.h" 18 #include "chrome/test/testing_profile.h"
19 #include "content/common/notification_service.h" 19 #include "content/common/notification_service.h"
20 #include "content/common/test_url_fetcher_factory.h"
21 #include "content/common/url_fetcher.h" 20 #include "content/common/url_fetcher.h"
21 #include "content/test/test_url_fetcher_factory.h"
22 #include "googleurl/src/gurl.h" 22 #include "googleurl/src/gurl.h"
23 #include "net/base/net_errors.h" 23 #include "net/base/net_errors.h"
24 #include "net/url_request/url_request_status.h" 24 #include "net/url_request/url_request_status.h"
25 #include "testing/gmock/include/gmock/gmock.h" 25 #include "testing/gmock/include/gmock/gmock.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 27
28 using ::testing::_; 28 using ::testing::_;
29 29
30 // These constants are internal to the GaiaOAuthFetcher implementation, and 30 // These constants are internal to the GaiaOAuthFetcher implementation, and
31 // should not be referenced except by unit tests, where they are required. 31 // should not be referenced except by unit tests, where they are required.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 net::ResponseCookies cookies; 225 net::ResponseCookies cookies;
226 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); 226 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
227 auth.OnURLFetchComplete(NULL, 227 auth.OnURLFetchComplete(NULL,
228 GURL(kUserInfoUrl), 228 GURL(kUserInfoUrl),
229 status, 229 status,
230 RC_REQUEST_OK, 230 RC_REQUEST_OK,
231 cookies, 231 cookies,
232 data); 232 data);
233 } 233 }
OLDNEW
« no previous file with comments | « chrome/browser/google/google_url_tracker_unittest.cc ('k') | chrome/browser/net/gaia/token_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698