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

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

Issue 10830036: Moved the AppNotification system into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 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
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"
11 #include "chrome/browser/extensions/app_notify_channel_setup.h" 11 #include "chrome/browser/extensions/app_notify_channel_setup.h"
12 #include "chrome/browser/extensions/app_notify_channel_ui.h" 12 #include "chrome/browser/extensions/app_notify_channel_ui.h"
13 #include "chrome/browser/signin/token_service_factory.h" 13 #include "chrome/browser/signin/token_service_factory.h"
14 #include "chrome/browser/signin/token_service_unittest.h" 14 #include "chrome/browser/signin/token_service_unittest.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/net/gaia/gaia_urls.h" 16 #include "chrome/common/net/gaia/gaia_urls.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "chrome/test/base/testing_pref_service.h" 18 #include "chrome/test/base/testing_pref_service.h"
19 #include "chrome/test/base/testing_profile.h" 19 #include "chrome/test/base/testing_profile.h"
20 #include "content/public/test/test_browser_thread.h" 20 #include "content/public/test/test_browser_thread.h"
21 #include "googleurl/src/gurl.h" 21 #include "googleurl/src/gurl.h"
22 #include "net/url_request/test_url_fetcher_factory.h" 22 #include "net/url_request/test_url_fetcher_factory.h"
23 #include "testing/gmock/include/gmock/gmock.h" 23 #include "testing/gmock/include/gmock/gmock.h"
24 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
25 25
26 using content::BrowserThread; 26 using content::BrowserThread;
27 using testing::_; 27 using testing::_;
28 using testing::Return; 28 using testing::Return;
29 29
30 namespace extensions {
31
30 namespace { 32 namespace {
31 33
32 const int kRouteId = 4; 34 const int kRouteId = 4;
33 const int kCallbackId = 5; 35 const int kCallbackId = 5;
34 const char* kFakeExtensionId = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 36 const char* kFakeExtensionId = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
35 37
36 static const char kValidAccessTokenResponse[] = 38 static const char kValidAccessTokenResponse[] =
37 "{" 39 "{"
38 " \"access_token\": \"at1\"," 40 " \"access_token\": \"at1\","
39 " \"expires_in\": 3600," 41 " \"expires_in\": 3600,"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 SetupLogin(false, true); 311 SetupLogin(false, true);
310 SetupFetchAccessToken(false); 312 SetupFetchAccessToken(false);
311 SetupLogin(true, true); 313 SetupLogin(true, true);
312 SetupFetchAccessToken(true); 314 SetupFetchAccessToken(true);
313 SetupRecordGrant(true); 315 SetupRecordGrant(true);
314 SetupGetChannelId(true); 316 SetupGetChannelId(true);
315 317
316 scoped_refptr<AppNotifyChannelSetup> setup = CreateInstance(); 318 scoped_refptr<AppNotifyChannelSetup> setup = CreateInstance();
317 RunServerTest(setup, "dummy_do_not_use", ""); 319 RunServerTest(setup, "dummy_do_not_use", "");
318 } 320 }
321
322 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_setup.cc ('k') | chrome/browser/extensions/app_notify_channel_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698