Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 TestDirectory::TestDirectory(Encryptor* encryptor, | 117 TestDirectory::TestDirectory(Encryptor* encryptor, |
| 118 UnrecoverableErrorHandler* handler, | 118 UnrecoverableErrorHandler* handler, |
| 119 TestBackingStore* backing_store) | 119 TestBackingStore* backing_store) |
| 120 : Directory(backing_store, handler, NULL, NULL, NULL), | 120 : Directory(backing_store, handler, NULL, NULL, NULL), |
| 121 backing_store_(backing_store) { | 121 backing_store_(backing_store) { |
| 122 } | 122 } |
| 123 | 123 |
| 124 TestDirectory::~TestDirectory() { } | 124 TestDirectory::~TestDirectory() { } |
| 125 | 125 |
| 126 TEST(OnDiskSyncableDirectory, FailInitialWrite) { | 126 TEST(OnDiskSyncableDirectory, FailInitialWrite) { |
| 127 base::MessageLoop message_loop; | |
|
maniscalco
2014/07/09 18:53:40
You may be wondering why the heck are we adding a
| |
| 127 FakeEncryptor encryptor; | 128 FakeEncryptor encryptor; |
| 128 TestUnrecoverableErrorHandler handler; | 129 TestUnrecoverableErrorHandler handler; |
| 129 base::ScopedTempDir temp_dir; | 130 base::ScopedTempDir temp_dir; |
| 130 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 131 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
| 131 base::FilePath file_path = temp_dir.path().Append( | 132 base::FilePath file_path = temp_dir.path().Append( |
| 132 FILE_PATH_LITERAL("Test.sqlite3")); | 133 FILE_PATH_LITERAL("Test.sqlite3")); |
| 133 std::string name = "user@x.com"; | 134 std::string name = "user@x.com"; |
| 134 NullDirectoryChangeDelegate delegate; | 135 NullDirectoryChangeDelegate delegate; |
| 135 | 136 |
| 136 scoped_ptr<TestDirectory> test_dir( | 137 scoped_ptr<TestDirectory> test_dir( |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 673 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { | 674 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { |
| 674 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 675 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 675 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 676 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 676 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); | 677 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); |
| 677 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); | 678 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); |
| 678 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); | 679 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); |
| 679 } | 680 } |
| 680 | 681 |
| 681 } // namespace syncable | 682 } // namespace syncable |
| 682 } // namespace syncer | 683 } // namespace syncer |
| OLD | NEW |