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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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/gaia_constants.h" 16 #include "chrome/common/net/gaia/gaia_constants.h"
17 #include "chrome/common/net/gaia/gaia_urls.h" 17 #include "chrome/common/net/gaia/gaia_urls.h"
18 #include "chrome/common/net/gaia/google_service_auth_error.h" 18 #include "chrome/common/net/gaia/google_service_auth_error.h"
19 #include "chrome/common/net/http_return.h" 19 #include "chrome/common/net/http_return.h"
20 #include "chrome/test/base/testing_profile.h" 20 #include "chrome/test/base/testing_profile.h"
21 #include "content/common/net/url_fetcher.h" 21 #include "content/common/net/url_fetcher.h"
22 #include "content/common/notification_service.h" 22 #include "content/public/browser/notification_details.h"
23 #include "content/public/browser/notification_source.h"
23 #include "content/test/test_url_fetcher_factory.h" 24 #include "content/test/test_url_fetcher_factory.h"
24 #include "googleurl/src/gurl.h" 25 #include "googleurl/src/gurl.h"
25 #include "net/base/net_errors.h" 26 #include "net/base/net_errors.h"
26 #include "net/url_request/url_request_status.h" 27 #include "net/url_request/url_request_status.h"
27 #include "testing/gmock/include/gmock/gmock.h" 28 #include "testing/gmock/include/gmock/gmock.h"
28 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
29 30
30 using ::testing::_; 31 using ::testing::_;
31 32
32 class MockGaiaOAuthConsumer : public GaiaOAuthConsumer { 33 class MockGaiaOAuthConsumer : public GaiaOAuthConsumer {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 profile.GetRequestContext(), 228 profile.GetRequestContext(),
228 &profile, 229 &profile,
229 "service_scope-Nrj4LmgU"); 230 "service_scope-Nrj4LmgU");
230 231
231 net::ResponseCookies cookies; 232 net::ResponseCookies cookies;
232 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); 233 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
233 GURL url(GaiaUrls::GetInstance()->oauth_revoke_token_url()); 234 GURL url(GaiaUrls::GetInstance()->oauth_revoke_token_url());
234 oauth_fetcher.OnURLFetchComplete(NULL, url, status, 235 oauth_fetcher.OnURLFetchComplete(NULL, url, status,
235 RC_REQUEST_OK, cookies, std::string()); 236 RC_REQUEST_OK, cookies, std::string());
236 } 237 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | chrome/browser/net/gaia/token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698