OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SETTINGS_SETTINGS_STORAGE_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_STORAGE_UNITTEST_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_STORAGE_UNITTEST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_STORAGE_UNITTEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 | 23 |
24 // Parameter type for the value-parameterized tests. | 24 // Parameter type for the value-parameterized tests. |
25 typedef SettingsStorage* (*SettingsStorageTestParam)( | 25 typedef SettingsStorage* (*SettingsStorageTestParam)( |
26 const FilePath& file_path, const std::string& extension_id); | 26 const FilePath& file_path, const std::string& extension_id); |
27 | 27 |
28 // Test fixture for SettingsStorage tests. Tests are defined in | 28 // Test fixture for SettingsStorage tests. Tests are defined in |
29 // settings_storage_unittest.cc with configurations for both cached | 29 // settings_storage_unittest.cc with configurations for both cached |
30 // and non-cached leveldb storage, and cached no-op storage. | 30 // and non-cached leveldb storage, and cached no-op storage. |
31 class SettingsStorageTest | 31 class ExtensionSettingsStorageTest |
32 : public testing::TestWithParam<SettingsStorageTestParam> { | 32 : public testing::TestWithParam<SettingsStorageTestParam> { |
33 public: | 33 public: |
34 SettingsStorageTest(); | 34 ExtensionSettingsStorageTest(); |
35 virtual ~SettingsStorageTest(); | 35 virtual ~ExtensionSettingsStorageTest(); |
36 | 36 |
37 virtual void SetUp() OVERRIDE; | 37 virtual void SetUp() OVERRIDE; |
38 virtual void TearDown() OVERRIDE; | 38 virtual void TearDown() OVERRIDE; |
39 | 39 |
40 protected: | 40 protected: |
41 scoped_ptr<SettingsStorage> storage_; | 41 scoped_ptr<SettingsStorage> storage_; |
42 | 42 |
43 std::string key1_; | 43 std::string key1_; |
44 std::string key2_; | 44 std::string key2_; |
45 std::string key3_; | 45 std::string key3_; |
(...skipping 29 matching lines...) Expand all Loading... |
75 | 75 |
76 // Need these so that the DCHECKs for running on FILE or UI threads pass. | 76 // Need these so that the DCHECKs for running on FILE or UI threads pass. |
77 MessageLoop message_loop_; | 77 MessageLoop message_loop_; |
78 content::TestBrowserThread ui_thread_; | 78 content::TestBrowserThread ui_thread_; |
79 content::TestBrowserThread file_thread_; | 79 content::TestBrowserThread file_thread_; |
80 }; | 80 }; |
81 | 81 |
82 } // namespace extensions | 82 } // namespace extensions |
83 | 83 |
84 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_STORAGE_UNITTEST_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_STORAGE_UNITTEST_H_ |
OLD | NEW |