| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "sync/sessions/ordered_commit_set.h" |
| 6 #include "sync/test/engine/test_id_factory.h" |
| 5 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 6 #include "chrome/browser/sync/sessions/ordered_commit_set.h" | |
| 7 #include "chrome/browser/sync/test/engine/test_id_factory.h" | |
| 8 | 8 |
| 9 using std::vector; | 9 using std::vector; |
| 10 | 10 |
| 11 class OrderedCommitSetTest : public testing::Test { | 11 class OrderedCommitSetTest : public testing::Test { |
| 12 public: | 12 public: |
| 13 OrderedCommitSetTest() { | 13 OrderedCommitSetTest() { |
| 14 routes_[syncable::BOOKMARKS] = browser_sync::GROUP_UI; | 14 routes_[syncable::BOOKMARKS] = browser_sync::GROUP_UI; |
| 15 routes_[syncable::PREFERENCES] = browser_sync::GROUP_UI; | 15 routes_[syncable::PREFERENCES] = browser_sync::GROUP_UI; |
| 16 routes_[syncable::AUTOFILL] = browser_sync::GROUP_DB; | 16 routes_[syncable::AUTOFILL] = browser_sync::GROUP_DB; |
| 17 routes_[syncable::TOP_LEVEL_FOLDER] = browser_sync::GROUP_PASSIVE; | 17 routes_[syncable::TOP_LEVEL_FOLDER] = browser_sync::GROUP_PASSIVE; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 commit_set.AddCommitItem(4, ids_.NewLocalId(), syncable::BOOKMARKS); | 111 commit_set.AddCommitItem(4, ids_.NewLocalId(), syncable::BOOKMARKS); |
| 112 EXPECT_TRUE(commit_set.HasBookmarkCommitId()); | 112 EXPECT_TRUE(commit_set.HasBookmarkCommitId()); |
| 113 | 113 |
| 114 commit_set.Truncate(4); | 114 commit_set.Truncate(4); |
| 115 EXPECT_FALSE(commit_set.HasBookmarkCommitId()); | 115 EXPECT_FALSE(commit_set.HasBookmarkCommitId()); |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace sessions | 118 } // namespace sessions |
| 119 } // namespace browser_sync | 119 } // namespace browser_sync |
| 120 | 120 |
| OLD | NEW |