| OLD | NEW |
| 1 // Copyright (c) 2012 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 <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 sync_pb::SessionTab* tab = tab_base->mutable_tab(); | 93 sync_pb::SessionTab* tab = tab_base->mutable_tab(); |
| 94 tab->set_tab_id(tab_id); | 94 tab->set_tab_id(tab_id); |
| 95 tab->set_tab_visual_index(1); | 95 tab->set_tab_visual_index(1); |
| 96 tab->set_current_navigation_index(0); | 96 tab->set_current_navigation_index(0); |
| 97 tab->set_pinned(true); | 97 tab->set_pinned(true); |
| 98 tab->set_extension_app_id("app_id"); | 98 tab->set_extension_app_id("app_id"); |
| 99 sync_pb::TabNavigation* navigation = tab->add_navigation(); | 99 sync_pb::TabNavigation* navigation = tab->add_navigation(); |
| 100 navigation->set_virtual_url("http://foo/1"); | 100 navigation->set_virtual_url("http://foo/1"); |
| 101 navigation->set_referrer("referrer"); | 101 navigation->set_referrer("referrer"); |
| 102 navigation->set_title("title"); | 102 navigation->set_title("title"); |
| 103 navigation->set_page_transition(sync_pb::TabNavigation_PageTransition_TYPED); | 103 navigation->set_page_transition(sync_pb::SyncEnums_PageTransition_TYPED); |
| 104 } | 104 } |
| 105 | 105 |
| 106 // Verifies number of windows, number of tabs, and basic fields. | 106 // Verifies number of windows, number of tabs, and basic fields. |
| 107 void VerifySyncedSession( | 107 void VerifySyncedSession( |
| 108 const std::string& tag, | 108 const std::string& tag, |
| 109 const std::vector<std::vector<SessionID::id_type> >& windows, | 109 const std::vector<std::vector<SessionID::id_type> >& windows, |
| 110 const SyncedSession& session) { | 110 const SyncedSession& session) { |
| 111 ASSERT_EQ(tag, session.session_tag); | 111 ASSERT_EQ(tag, session.session_tag); |
| 112 ASSERT_EQ(SyncedSession::TYPE_LINUX, session.device_type); | 112 ASSERT_EQ(SyncedSession::TYPE_LINUX, session.device_type); |
| 113 ASSERT_EQ("name", session.session_name); | 113 ASSERT_EQ("name", session.session_name); |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 sync_pb::SessionSpecifics specifics; | 1191 sync_pb::SessionSpecifics specifics; |
| 1192 header.SetSessionSpecifics(specifics); | 1192 header.SetSessionSpecifics(specifics); |
| 1193 } | 1193 } |
| 1194 // Ensure we associate properly despite the pre-existing node with our local | 1194 // Ensure we associate properly despite the pre-existing node with our local |
| 1195 // tag. | 1195 // tag. |
| 1196 error = model_associator_->AssociateModels(); | 1196 error = model_associator_->AssociateModels(); |
| 1197 ASSERT_FALSE(error.IsSet()); | 1197 ASSERT_FALSE(error.IsSet()); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 } // namespace browser_sync | 1200 } // namespace browser_sync |
| OLD | NEW |