| 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 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 14 matching lines...) Expand all Loading... |
| 25 #include "sync/util/time.h" | 25 #include "sync/util/time.h" |
| 26 #include "testing/gtest/include/gtest/gtest-param-test.h" | 26 #include "testing/gtest/include/gtest/gtest-param-test.h" |
| 27 | 27 |
| 28 namespace syncer { | 28 namespace syncer { |
| 29 namespace syncable { | 29 namespace syncable { |
| 30 | 30 |
| 31 SYNC_EXPORT_PRIVATE extern const int32 kCurrentDBVersion; | 31 SYNC_EXPORT_PRIVATE extern const int32 kCurrentDBVersion; |
| 32 | 32 |
| 33 class MigrationTest : public testing::TestWithParam<int> { | 33 class MigrationTest : public testing::TestWithParam<int> { |
| 34 public: | 34 public: |
| 35 virtual void SetUp() { | 35 void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } |
| 36 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | |
| 37 } | |
| 38 | 36 |
| 39 protected: | 37 protected: |
| 40 std::string GetUsername() { | 38 std::string GetUsername() { |
| 41 return "nick@chromium.org"; | 39 return "nick@chromium.org"; |
| 42 } | 40 } |
| 43 | 41 |
| 44 base::FilePath GetDatabasePath() { | 42 base::FilePath GetDatabasePath() { |
| 45 return temp_dir_.path().Append(Directory::kSyncDatabaseFilename); | 43 return temp_dir_.path().Append(Directory::kSyncDatabaseFilename); |
| 46 } | 44 } |
| 47 | 45 |
| (...skipping 3902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3950 const std::string& guid2 = TestDirectoryBackingStore::GenerateCacheGUID(); | 3948 const std::string& guid2 = TestDirectoryBackingStore::GenerateCacheGUID(); |
| 3951 EXPECT_EQ(24U, guid1.size()); | 3949 EXPECT_EQ(24U, guid1.size()); |
| 3952 EXPECT_EQ(24U, guid2.size()); | 3950 EXPECT_EQ(24U, guid2.size()); |
| 3953 // In theory this test can fail, but it won't before the universe | 3951 // In theory this test can fail, but it won't before the universe |
| 3954 // dies of heat death. | 3952 // dies of heat death. |
| 3955 EXPECT_NE(guid1, guid2); | 3953 EXPECT_NE(guid1, guid2); |
| 3956 } | 3954 } |
| 3957 | 3955 |
| 3958 } // namespace syncable | 3956 } // namespace syncable |
| 3959 } // namespace syncer | 3957 } // namespace syncer |
| OLD | NEW |