| 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/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 TestDirectory::TestDirectory( | 116 TestDirectory::TestDirectory( |
| 117 Encryptor* encryptor, | 117 Encryptor* encryptor, |
| 118 const WeakHandle<UnrecoverableErrorHandler>& handler, | 118 const WeakHandle<UnrecoverableErrorHandler>& handler, |
| 119 TestBackingStore* backing_store) | 119 TestBackingStore* backing_store) |
| 120 : Directory(backing_store, handler, base::Closure(), NULL, NULL), | 120 : Directory(backing_store, handler, base::Closure(), NULL, NULL), |
| 121 backing_store_(backing_store) {} | 121 backing_store_(backing_store) {} |
| 122 | 122 |
| 123 TestDirectory::~TestDirectory() { } | 123 TestDirectory::~TestDirectory() { } |
| 124 | 124 |
| 125 TEST(OnDiskSyncableDirectory, FailInitialWrite) { | 125 // crbug.com/144422 |
| 126 #if defined(OS_ANDROID) |
| 127 #define MAYBE_FailInitialWrite DISABLED_FailInitialWrite |
| 128 #else |
| 129 #define MAYBE_FailInitialWrite FailInitialWrite |
| 130 #endif |
| 131 TEST(OnDiskSyncableDirectory, MAYBE_FailInitialWrite) { |
| 126 base::MessageLoop message_loop; | 132 base::MessageLoop message_loop; |
| 127 FakeEncryptor encryptor; | 133 FakeEncryptor encryptor; |
| 128 TestUnrecoverableErrorHandler handler; | 134 TestUnrecoverableErrorHandler handler; |
| 129 base::ScopedTempDir temp_dir; | 135 base::ScopedTempDir temp_dir; |
| 130 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 136 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
| 131 base::FilePath file_path = temp_dir.path().Append( | 137 base::FilePath file_path = temp_dir.path().Append( |
| 132 FILE_PATH_LITERAL("Test.sqlite3")); | 138 FILE_PATH_LITERAL("Test.sqlite3")); |
| 133 std::string name = "user@x.com"; | 139 std::string name = "user@x.com"; |
| 134 NullDirectoryChangeDelegate delegate; | 140 NullDirectoryChangeDelegate delegate; |
| 135 | 141 |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { | 670 TEST_F(SyncableClientTagTest, TestClientTagIndexDuplicateServer) { |
| 665 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 671 EXPECT_TRUE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 666 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); | 672 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), true)); |
| 667 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); | 673 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewServerId(), false)); |
| 668 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); | 674 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), false)); |
| 669 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); | 675 EXPECT_FALSE(CreateWithDefaultTag(factory_.NewLocalId(), true)); |
| 670 } | 676 } |
| 671 | 677 |
| 672 } // namespace syncable | 678 } // namespace syncable |
| 673 } // namespace syncer | 679 } // namespace syncer |
| OLD | NEW |