| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_API_UNITTEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_UNITTEST_H_ |
| 6 #define EXTENSIONS_BROWSER_API_UNITTEST_H_ | 6 #define EXTENSIONS_BROWSER_API_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "components/pref_registry/testing_pref_service_syncable.h" | |
| 13 #include "extensions/browser/extensions_test.h" | 12 #include "extensions/browser/extensions_test.h" |
| 14 | 13 |
| 15 namespace base { | 14 namespace base { |
| 16 class Value; | 15 class Value; |
| 17 class DictionaryValue; | 16 class DictionaryValue; |
| 18 class ListValue; | 17 class ListValue; |
| 19 } | 18 } |
| 20 | 19 |
| 21 namespace content { | 20 namespace content { |
| 22 class NotificationService; | 21 class NotificationService; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 const std::string& args); | 82 const std::string& args); |
| 84 | 83 |
| 85 // Run the function and ignore any result. | 84 // Run the function and ignore any result. |
| 86 void RunFunction(UIThreadExtensionFunction* function, | 85 void RunFunction(UIThreadExtensionFunction* function, |
| 87 const std::string& args); | 86 const std::string& args); |
| 88 | 87 |
| 89 private: | 88 private: |
| 90 std::unique_ptr<content::NotificationService> notification_service_; | 89 std::unique_ptr<content::NotificationService> notification_service_; |
| 91 | 90 |
| 92 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; | 91 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
| 93 user_prefs::TestingPrefServiceSyncable testing_pref_service_; | |
| 94 | 92 |
| 95 // The WebContents used to associate a RenderViewHost with API function calls, | 93 // The WebContents used to associate a RenderViewHost with API function calls, |
| 96 // or null. | 94 // or null. |
| 97 std::unique_ptr<content::WebContents> contents_; | 95 std::unique_ptr<content::WebContents> contents_; |
| 98 | 96 |
| 99 // The Extension used when running API function calls. | 97 // The Extension used when running API function calls. |
| 100 scoped_refptr<Extension> extension_; | 98 scoped_refptr<Extension> extension_; |
| 101 }; | 99 }; |
| 102 | 100 |
| 103 } // namespace extensions | 101 } // namespace extensions |
| 104 | 102 |
| 105 #endif // EXTENSIONS_BROWSER_API_UNITTEST_H_ | 103 #endif // EXTENSIONS_BROWSER_API_UNITTEST_H_ |
| OLD | NEW |