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

Side by Side Diff: chrome/browser/extensions/app_notify_channel_setup_unittest.cc

Issue 12211076: Refactored FakeURLFetcher to make it more flexible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 DISALLOW_COPY_AND_ASSIGN(TestUI); 170 DISALLOW_COPY_AND_ASSIGN(TestUI);
171 }; 171 };
172 172
173 } // namespace 173 } // namespace
174 174
175 class AppNotifyChannelSetupTest : public testing::Test { 175 class AppNotifyChannelSetupTest : public testing::Test {
176 public: 176 public:
177 AppNotifyChannelSetupTest() : ui_thread_(BrowserThread::UI, &message_loop_), 177 AppNotifyChannelSetupTest() : ui_thread_(BrowserThread::UI, &message_loop_),
178 db_thread_(BrowserThread::DB), 178 db_thread_(BrowserThread::DB),
179 ui_(new TestUI()) { 179 ui_(new TestUI()),
180 factory_(NULL) {
180 } 181 }
181 182
182 virtual ~AppNotifyChannelSetupTest() {} 183 virtual ~AppNotifyChannelSetupTest() {}
183 184
184 virtual void SetLoggedInUser(const std::string username) { 185 virtual void SetLoggedInUser(const std::string username) {
185 profile_.GetPrefs()->SetString(prefs::kGoogleServicesUsername, username); 186 profile_.GetPrefs()->SetString(prefs::kGoogleServicesUsername, username);
186 } 187 }
187 188
188 virtual AppNotifyChannelSetup* CreateInstance() { 189 virtual AppNotifyChannelSetup* CreateInstance() {
189 GURL page_url("http://www.google.com"); 190 GURL page_url("http://www.google.com");
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 SetupLogin(true, true); 312 SetupLogin(true, true);
312 SetupFetchAccessToken(true); 313 SetupFetchAccessToken(true);
313 SetupRecordGrant(true); 314 SetupRecordGrant(true);
314 SetupGetChannelId(true); 315 SetupGetChannelId(true);
315 316
316 scoped_refptr<AppNotifyChannelSetup> setup = CreateInstance(); 317 scoped_refptr<AppNotifyChannelSetup> setup = CreateInstance();
317 RunServerTest(setup, "dummy_do_not_use", ""); 318 RunServerTest(setup, "dummy_do_not_use", "");
318 } 319 }
319 320
320 } // namespace extensions 321 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/client_side_detection_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698