Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: chrome/browser/sync/glue/session_sync_test_helper.cc

Issue 658073004: Rewrites SerializedNavigationEntry to not have any //content member variables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/sync/glue/session_sync_test_helper.h" 5 #include "chrome/browser/sync/glue/session_sync_test_helper.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/sync/glue/synced_session.h" 8 #include "chrome/browser/sync/glue/synced_session.h"
9 #include "sync/protocol/session_specifics.pb.h" 9 #include "sync/protocol/session_specifics.pb.h"
10 #include "sync/protocol/sync_enums.pb.h" 10 #include "sync/protocol/sync_enums.pb.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 tab_iter != (*win_iter).end(); ++tab_iter, ++j) { 75 tab_iter != (*win_iter).end(); ++tab_iter, ++j) {
76 SessionTab* tab = win_ptr->tabs[j]; 76 SessionTab* tab = win_ptr->tabs[j];
77 ASSERT_EQ(*tab_iter, tab->tab_id.id()); 77 ASSERT_EQ(*tab_iter, tab->tab_id.id());
78 ASSERT_EQ(1U, tab->navigations.size()); 78 ASSERT_EQ(1U, tab->navigations.size());
79 ASSERT_EQ(1, tab->tab_visual_index); 79 ASSERT_EQ(1, tab->tab_visual_index);
80 ASSERT_EQ(0, tab->current_navigation_index); 80 ASSERT_EQ(0, tab->current_navigation_index);
81 ASSERT_TRUE(tab->pinned); 81 ASSERT_TRUE(tab->pinned);
82 ASSERT_EQ(kAppId, tab->extension_app_id); 82 ASSERT_EQ(kAppId, tab->extension_app_id);
83 ASSERT_EQ(1U, tab->navigations.size()); 83 ASSERT_EQ(1U, tab->navigations.size());
84 ASSERT_EQ(tab->navigations[0].virtual_url(), GURL(kVirtualUrl)); 84 ASSERT_EQ(tab->navigations[0].virtual_url(), GURL(kVirtualUrl));
85 ASSERT_EQ(tab->navigations[0].referrer().url, GURL(kReferrer)); 85 ASSERT_EQ(tab->navigations[0].referrer_url(), GURL(kReferrer));
86 ASSERT_EQ(tab->navigations[0].title(), 86 ASSERT_EQ(tab->navigations[0].title(),
87 base::ASCIIToUTF16(kTitle)); 87 base::ASCIIToUTF16(kTitle));
88 ASSERT_EQ(tab->navigations[0].transition_type(), 88 ASSERT_EQ(tab->navigations[0].transition_type(),
89 ui::PAGE_TRANSITION_TYPED); 89 ui::PAGE_TRANSITION_TYPED);
90 } 90 }
91 } 91 }
92 } 92 }
93 93
94 void SessionSyncTestHelper::BuildTabSpecifics( 94 void SessionSyncTestHelper::BuildTabSpecifics(
95 const std::string& tag, 95 const std::string& tag,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 for (size_t i = 0; i < tab_list.size(); ++i) { 127 for (size_t i = 0; i < tab_list.size(); ++i) {
128 BuildTabSpecifics(tag, 0, tab_list[i], &tabs1[i]); 128 BuildTabSpecifics(tag, 0, tab_list[i], &tabs1[i]);
129 } 129 }
130 130
131 if (tabs) 131 if (tabs)
132 tabs->swap(tabs1); 132 tabs->swap(tabs1);
133 return meta; 133 return meta;
134 } 134 }
135 135
136 } // namespace browser_sync 136 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_types_unittest.cc ('k') | chrome/browser/sync/test/integration/sessions_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698