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

Side by Side Diff: chrome/browser/extensions/api/sockets_udp/sockets_udp_api_unittest.cc

Issue 197413002: Move extensions-related files to using //components/keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/values.h" 5 #include "base/values.h"
6 #include "chrome/browser/browser_process_impl.h" 6 #include "chrome/browser/browser_process_impl.h"
7 #include "chrome/browser/extensions/extension_api_unittest.h" 7 #include "chrome/browser/extensions/extension_api_unittest.h"
8 #include "chrome/browser/extensions/extension_function_test_utils.h" 8 #include "chrome/browser/extensions/extension_function_test_utils.h"
9 #include "chrome/browser/extensions/test_extension_system.h" 9 #include "chrome/browser/extensions/test_extension_system.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "chrome/test/base/testing_browser_process.h" 11 #include "chrome/test/base/testing_browser_process.h"
12 #include "extensions/browser/api/api_resource_manager.h" 12 #include "extensions/browser/api/api_resource_manager.h"
13 #include "extensions/browser/api/socket/socket.h" 13 #include "extensions/browser/api/socket/socket.h"
14 #include "extensions/browser/api/socket/udp_socket.h" 14 #include "extensions/browser/api/socket/udp_socket.h"
15 #include "extensions/browser/api/sockets_udp/sockets_udp_api.h" 15 #include "extensions/browser/api/sockets_udp/sockets_udp_api.h"
16 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace utils = extension_function_test_utils; 19 namespace utils = extension_function_test_utils;
20 20
21 namespace extensions { 21 namespace extensions {
22 namespace core_api { 22 namespace core_api {
23 23
24 static BrowserContextKeyedService* ApiResourceManagerTestFactory( 24 static KeyedService* ApiResourceManagerTestFactory(
25 content::BrowserContext* context) { 25 content::BrowserContext* context) {
26 content::BrowserThread::ID id; 26 content::BrowserThread::ID id;
27 CHECK(content::BrowserThread::GetCurrentThreadIdentifier(&id)); 27 CHECK(content::BrowserThread::GetCurrentThreadIdentifier(&id));
28 return ApiResourceManager< 28 return ApiResourceManager<
29 ResumableUDPSocket>::CreateApiResourceManagerForTest(context, id); 29 ResumableUDPSocket>::CreateApiResourceManagerForTest(context, id);
30 } 30 }
31 31
32 class SocketsUdpUnitTest : public ExtensionApiUnittest { 32 class SocketsUdpUnitTest : public ExtensionApiUnittest {
33 public: 33 public:
34 virtual void SetUp() { 34 virtual void SetUp() {
(...skipping 15 matching lines...) Expand all
50 function->set_work_thread_id(id); 50 function->set_work_thread_id(id);
51 51
52 // Run tests 52 // Run tests
53 scoped_ptr<base::DictionaryValue> result(RunFunctionAndReturnDictionary( 53 scoped_ptr<base::DictionaryValue> result(RunFunctionAndReturnDictionary(
54 function, "[{\"persistent\": true, \"name\": \"foo\"}]")); 54 function, "[{\"persistent\": true, \"name\": \"foo\"}]"));
55 ASSERT_TRUE(result.get()); 55 ASSERT_TRUE(result.get());
56 } 56 }
57 57
58 } // namespace core_api 58 } // namespace core_api
59 } // namespace extensions 59 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698