| 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_UNITTEST_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_UNITTEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_UNITTEST_H_ |
| 7 | 7 |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/extensions/test_extension_prefs.h" | 9 #include "chrome/browser/extensions/test_extension_prefs.h" |
| 10 #include "chrome/common/extensions/extension_unittest.h" | |
| 11 #include "content/public/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 12 |
| 14 class PrefRegistrySyncable; | 13 class PrefRegistrySyncable; |
| 15 | 14 |
| 16 namespace base { | 15 namespace base { |
| 17 class Value; | 16 class Value; |
| 18 } | 17 } |
| 19 | 18 |
| 20 namespace extensions { | 19 namespace extensions { |
| 21 class Extension; | 20 class Extension; |
| 22 | 21 |
| 23 // Base class for extension preference-related unit tests. | 22 // Base class for extension preference-related unit tests. |
| 24 class ExtensionPrefsTest : public ExtensionTest { | 23 class ExtensionPrefsTest : public testing::Test { |
| 25 public: | 24 public: |
| 26 ExtensionPrefsTest(); | 25 ExtensionPrefsTest(); |
| 27 virtual ~ExtensionPrefsTest(); | 26 virtual ~ExtensionPrefsTest(); |
| 28 | 27 |
| 29 // This function will get called once, and is the right place to do operations | 28 // This function will get called once, and is the right place to do operations |
| 30 // on ExtensionPrefs that write data. | 29 // on ExtensionPrefs that write data. |
| 31 virtual void Initialize() = 0; | 30 virtual void Initialize() = 0; |
| 32 | 31 |
| 33 // This function will be called twice - once while the original ExtensionPrefs | 32 // This function will be called twice - once while the original ExtensionPrefs |
| 34 // object is still alive, and once after recreation. Thus, it tests that | 33 // object is still alive, and once after recreation. Thus, it tests that |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 93 |
| 95 scoped_refptr<Extension> ext1_scoped_; | 94 scoped_refptr<Extension> ext1_scoped_; |
| 96 scoped_refptr<Extension> ext2_scoped_; | 95 scoped_refptr<Extension> ext2_scoped_; |
| 97 scoped_refptr<Extension> ext3_scoped_; | 96 scoped_refptr<Extension> ext3_scoped_; |
| 98 scoped_refptr<Extension> ext4_scoped_; | 97 scoped_refptr<Extension> ext4_scoped_; |
| 99 }; | 98 }; |
| 100 | 99 |
| 101 } // namespace extensions | 100 } // namespace extensions |
| 102 | 101 |
| 103 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_UNITTEST_H_ | 102 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_UNITTEST_H_ |
| OLD | NEW |