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_VALUE_STORE_VALUE_STORE_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UNITTEST_H_ |
6 #define CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UNITTEST_H_ | 6 #define CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UNITTEST_H_ |
7 | 7 |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 | 9 |
| 10 #include "base/files/scoped_temp_dir.h" |
10 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
13 #include "base/scoped_temp_dir.h" | |
14 #include "chrome/browser/value_store/value_store.h" | 14 #include "chrome/browser/value_store/value_store.h" |
15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
16 #include "content/public/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
17 | 17 |
18 // Parameter type for the value-parameterized tests. | 18 // Parameter type for the value-parameterized tests. |
19 typedef ValueStore* (*ValueStoreTestParam)(const FilePath& file_path); | 19 typedef ValueStore* (*ValueStoreTestParam)(const FilePath& file_path); |
20 | 20 |
21 // Test fixture for ValueStore tests. Tests are defined in | 21 // Test fixture for ValueStore tests. Tests are defined in |
22 // settings_storage_unittest.cc with configurations for both cached | 22 // settings_storage_unittest.cc with configurations for both cached |
23 // and non-cached leveldb storage, and cached no-op storage. | 23 // and non-cached leveldb storage, and cached no-op storage. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 std::set<std::string> set13_; | 56 std::set<std::string> set13_; |
57 std::set<std::string> set123_; | 57 std::set<std::string> set123_; |
58 | 58 |
59 scoped_ptr<DictionaryValue> empty_dict_; | 59 scoped_ptr<DictionaryValue> empty_dict_; |
60 scoped_ptr<DictionaryValue> dict1_; | 60 scoped_ptr<DictionaryValue> dict1_; |
61 scoped_ptr<DictionaryValue> dict3_; | 61 scoped_ptr<DictionaryValue> dict3_; |
62 scoped_ptr<DictionaryValue> dict12_; | 62 scoped_ptr<DictionaryValue> dict12_; |
63 scoped_ptr<DictionaryValue> dict123_; | 63 scoped_ptr<DictionaryValue> dict123_; |
64 | 64 |
65 private: | 65 private: |
66 ScopedTempDir temp_dir_; | 66 base::ScopedTempDir temp_dir_; |
67 | 67 |
68 // Need these so that the DCHECKs for running on FILE or UI threads pass. | 68 // Need these so that the DCHECKs for running on FILE or UI threads pass. |
69 MessageLoop message_loop_; | 69 MessageLoop message_loop_; |
70 content::TestBrowserThread ui_thread_; | 70 content::TestBrowserThread ui_thread_; |
71 content::TestBrowserThread file_thread_; | 71 content::TestBrowserThread file_thread_; |
72 }; | 72 }; |
73 | 73 |
74 #endif // CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UNITTEST_H_ | 74 #endif // CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UNITTEST_H_ |
OLD | NEW |