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

Side by Side Diff: components/sessions/serialized_navigation_entry_unittest.cc

Issue 869613006: Move referrer policy to a different field when serializing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 10 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "components/sessions/serialized_navigation_entry.h" 5 #include "components/sessions/serialized_navigation_entry.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
23 #include "url/gurl.h" 23 #include "url/gurl.h"
24 24
25 namespace sessions { 25 namespace sessions {
26 namespace { 26 namespace {
27 27
28 // Create a sync_pb::TabNavigation from the constants above. 28 // Create a sync_pb::TabNavigation from the constants above.
29 sync_pb::TabNavigation MakeSyncDataForTest() { 29 sync_pb::TabNavigation MakeSyncDataForTest() {
30 sync_pb::TabNavigation sync_data; 30 sync_pb::TabNavigation sync_data;
31 sync_data.set_virtual_url(test_data::kVirtualURL.spec()); 31 sync_data.set_virtual_url(test_data::kVirtualURL.spec());
32 sync_data.set_referrer(test_data::kReferrerURL.spec()); 32 sync_data.set_referrer(test_data::kReferrerURL.spec());
33 sync_data.set_referrer_policy(test_data::kReferrerPolicy); 33 sync_data.set_obsolete_referrer_policy(test_data::kReferrerPolicy);
34 sync_data.set_correct_referrer_policy(test_data::kReferrerPolicy);
34 sync_data.set_title(base::UTF16ToUTF8(test_data::kTitle)); 35 sync_data.set_title(base::UTF16ToUTF8(test_data::kTitle));
35 sync_data.set_state(test_data::kEncodedPageState); 36 sync_data.set_state(test_data::kEncodedPageState);
36 sync_data.set_page_transition( 37 sync_data.set_page_transition(
37 sync_pb::SyncEnums_PageTransition_AUTO_SUBFRAME); 38 sync_pb::SyncEnums_PageTransition_AUTO_SUBFRAME);
38 sync_data.set_unique_id(test_data::kUniqueID); 39 sync_data.set_unique_id(test_data::kUniqueID);
39 sync_data.set_timestamp_msec(syncer::TimeToProtoTime(test_data::kTimestamp)); 40 sync_data.set_timestamp_msec(syncer::TimeToProtoTime(test_data::kTimestamp));
40 sync_data.set_redirect_type(sync_pb::SyncEnums::CLIENT_REDIRECT); 41 sync_data.set_redirect_type(sync_pb::SyncEnums::CLIENT_REDIRECT);
41 sync_data.set_navigation_home_page(true); 42 sync_data.set_navigation_home_page(true);
42 sync_data.set_search_terms(base::UTF16ToUTF8(test_data::kSearchTerms)); 43 sync_data.set_search_terms(base::UTF16ToUTF8(test_data::kSearchTerms));
43 sync_data.set_favicon_url(test_data::kFaviconURL.spec()); 44 sync_data.set_favicon_url(test_data::kFaviconURL.spec());
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 const ui::PageTransition constructed_transition = 218 const ui::PageTransition constructed_transition =
218 constructed_nav.transition_type(); 219 constructed_nav.transition_type();
219 220
220 EXPECT_EQ(transition, constructed_transition); 221 EXPECT_EQ(transition, constructed_transition);
221 } 222 }
222 } 223 }
223 } 224 }
224 225
225 } // namespace 226 } // namespace
226 } // namespace sessions 227 } // namespace sessions
OLDNEW
« no previous file with comments | « components/sessions/serialized_navigation_entry.cc ('k') | sync/protocol/proto_value_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698