Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Side by Side Diff: sync/syncable/deferred_on_disk_directory_backing_store_unittest.cc

Issue 792343004: Standardize usage of virtual/override/final specifiers in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/files/scoped_temp_dir.h" 5 #include "base/files/scoped_temp_dir.h"
6 #include "base/stl_util.h" 6 #include "base/stl_util.h"
7 #include "sync/syncable/deferred_on_disk_directory_backing_store.h" 7 #include "sync/syncable/deferred_on_disk_directory_backing_store.h"
8 #include "sync/syncable/directory.h" 8 #include "sync/syncable/directory.h"
9 #include "sync/syncable/entry_kernel.h" 9 #include "sync/syncable/entry_kernel.h"
10 #include "sync/syncable/on_disk_directory_backing_store.h" 10 #include "sync/syncable/on_disk_directory_backing_store.h"
11 #include "sync/syncable/syncable_delete_journal.h" 11 #include "sync/syncable/syncable_delete_journal.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 namespace syncable { 15 namespace syncable {
16 namespace { 16 namespace {
17 17
18 static const base::FilePath::CharType kSyncDataFolderName[] = 18 static const base::FilePath::CharType kSyncDataFolderName[] =
19 FILE_PATH_LITERAL("Sync Data"); 19 FILE_PATH_LITERAL("Sync Data");
20 20
21 class DeferredOnDiskDirectoryBackingStoreTest : public testing::Test { 21 class DeferredOnDiskDirectoryBackingStoreTest : public testing::Test {
22 protected: 22 protected:
23 virtual void SetUp() override { 23 void SetUp() override {
24 CHECK(temp_dir_.CreateUniqueTempDir()); 24 CHECK(temp_dir_.CreateUniqueTempDir());
25 db_path_ = temp_dir_.path().Append(kSyncDataFolderName); 25 db_path_ = temp_dir_.path().Append(kSyncDataFolderName);
26 } 26 }
27 27
28 virtual void TearDown() override { 28 void TearDown() override { STLDeleteValues(&handles_map_); }
29 STLDeleteValues(&handles_map_);
30 }
31 29
32 base::ScopedTempDir temp_dir_; 30 base::ScopedTempDir temp_dir_;
33 base::FilePath db_path_; 31 base::FilePath db_path_;
34 Directory::MetahandlesMap handles_map_; 32 Directory::MetahandlesMap handles_map_;
35 JournalIndex delete_journals_; 33 JournalIndex delete_journals_;
36 Directory::KernelLoadInfo kernel_load_info_; 34 Directory::KernelLoadInfo kernel_load_info_;
37 }; 35 };
38 36
39 // Test initialization of root entry when calling Load(). 37 // Test initialization of root entry when calling Load().
40 TEST_F(DeferredOnDiskDirectoryBackingStoreTest, Load) { 38 TEST_F(DeferredOnDiskDirectoryBackingStoreTest, Load) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 ASSERT_EQ(2u, handles_map_.size()); 103 ASSERT_EQ(2u, handles_map_.size());
106 ASSERT_TRUE(handles_map_.count(1)); // root node 104 ASSERT_TRUE(handles_map_.count(1)); // root node
107 ASSERT_TRUE(handles_map_.count(2)); 105 ASSERT_TRUE(handles_map_.count(2));
108 EntryKernel* entry = handles_map_[2]; 106 EntryKernel* entry = handles_map_[2];
109 EXPECT_EQ(Id::CreateFromClientString("test_entry"), entry->ref(ID)); 107 EXPECT_EQ(Id::CreateFromClientString("test_entry"), entry->ref(ID));
110 } 108 }
111 109
112 } // namespace 110 } // namespace
113 } // namespace syncable 111 } // namespace syncable
114 } // namespace syncer 112 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/sessions/model_type_registry_unittest.cc ('k') | sync/syncable/directory_backing_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698