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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |