| 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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "chrome/browser/extensions/extension_api_unittest.h" | 9 #include "chrome/browser/extensions/extension_api_unittest.h" |
| 10 #include "chrome/browser/extensions/test_extension_system.h" | 10 #include "chrome/browser/extensions/test_extension_system.h" |
| 11 #include "extensions/browser/api/storage/leveldb_settings_storage_factory.h" | 11 #include "extensions/browser/api/storage/leveldb_settings_storage_factory.h" |
| 12 #include "extensions/browser/api/storage/settings_storage_quota_enforcer.h" | 12 #include "extensions/browser/api/storage/settings_storage_quota_enforcer.h" |
| 13 #include "extensions/browser/api/storage/settings_test_util.h" | 13 #include "extensions/browser/api/storage/settings_test_util.h" |
| 14 #include "extensions/browser/api/storage/storage_api.h" | 14 #include "extensions/browser/api/storage/storage_api.h" |
| 15 #include "extensions/browser/api/storage/storage_frontend.h" | 15 #include "extensions/browser/api/storage/storage_frontend.h" |
| 16 #include "extensions/browser/event_router.h" | 16 #include "extensions/browser/event_router.h" |
| 17 #include "extensions/browser/extension_prefs.h" | 17 #include "extensions/browser/extension_prefs.h" |
| 18 #include "extensions/browser/extension_system.h" | 18 #include "extensions/browser/extension_system.h" |
| 19 #include "extensions/browser/value_store/leveldb_value_store.h" | 19 #include "extensions/browser/value_store/leveldb_value_store.h" |
| 20 #include "extensions/browser/value_store/value_store.h" | 20 #include "extensions/browser/value_store/value_store.h" |
| 21 #include "extensions/common/id_util.h" | |
| 22 #include "extensions/common/manifest.h" | 21 #include "extensions/common/manifest.h" |
| 23 #include "extensions/common/test_util.h" | 22 #include "extensions/common/test_util.h" |
| 24 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 23 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
| 25 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" | 24 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" |
| 26 | 25 |
| 27 namespace extensions { | 26 namespace extensions { |
| 28 | 27 |
| 29 namespace { | 28 namespace { |
| 30 | 29 |
| 31 // Caller owns the returned object. | 30 // Caller owns the returned object. |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 EXPECT_TRUE(leveldb_store->Get(kKey)->IsCorrupted()); | 109 EXPECT_TRUE(leveldb_store->Get(kKey)->IsCorrupted()); |
| 111 | 110 |
| 112 // Running another set should end up working (even though it will restore the | 111 // Running another set should end up working (even though it will restore the |
| 113 // store behind the scenes). | 112 // store behind the scenes). |
| 114 RunSetFunction(kKey, kValue); | 113 RunSetFunction(kKey, kValue); |
| 115 EXPECT_TRUE(RunGetFunction(kKey, &result)); | 114 EXPECT_TRUE(RunGetFunction(kKey, &result)); |
| 116 EXPECT_EQ(kValue, result); | 115 EXPECT_EQ(kValue, result); |
| 117 } | 116 } |
| 118 | 117 |
| 119 } // namespace extensions | 118 } // namespace extensions |
| OLD | NEW |