| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/sync/core/model_type_store_backend.h" | 5 #include "components/sync/core/model_type_store_backend.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "third_party/leveldatabase/src/include/leveldb/env.h" | 10 #include "third_party/leveldatabase/src/include/leveldb/env.h" |
| 9 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" | 11 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" |
| 10 | 12 |
| 11 namespace syncer { | 13 namespace syncer { |
| 12 | 14 |
| 13 class ModelTypeStoreBackendTest : public testing::Test { | 15 class ModelTypeStoreBackendTest : public testing::Test { |
| 14 public: | 16 public: |
| 15 scoped_refptr<ModelTypeStoreBackend> GetOrCreateBackend() { | 17 scoped_refptr<ModelTypeStoreBackend> GetOrCreateBackend() { |
| 16 std::string path = "/test_db"; | 18 std::string path = "/test_db"; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 ASSERT_TRUE(backend_second->HasOneRef()); | 183 ASSERT_TRUE(backend_second->HasOneRef()); |
| 182 ASSERT_FALSE(BackendExistsForPath(path)); | 184 ASSERT_FALSE(BackendExistsForPath(path)); |
| 183 | 185 |
| 184 // delete another backend. | 186 // delete another backend. |
| 185 backend_second = nullptr; | 187 backend_second = nullptr; |
| 186 ASSERT_FALSE(backend_second.get()); | 188 ASSERT_FALSE(backend_second.get()); |
| 187 ASSERT_FALSE(BackendExistsForPath("/test_db2")); | 189 ASSERT_FALSE(BackendExistsForPath("/test_db2")); |
| 188 } | 190 } |
| 189 | 191 |
| 190 } // namespace syncer | 192 } // namespace syncer |
| OLD | NEW |