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

Side by Side Diff: components/sessions/content/content_serialized_navigation_builder_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/content/content_serialized_navigation_builder.h" 5 #include "components/sessions/content/content_serialized_navigation_builder.h"
6 6
7 #include "components/sessions/core/serialized_navigation_entry.h" 7 #include "components/sessions/core/serialized_navigation_entry.h"
8 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" 8 #include "components/sessions/core/serialized_navigation_entry_test_helper.h"
9 #include "content/public/browser/favicon_status.h" 9 #include "content/public/browser/favicon_status.h"
10 #include "content/public/browser/navigation_entry.h" 10 #include "content/public/browser/navigation_entry.h"
(...skipping 25 matching lines...) Expand all
36 navigation_entry->SetExtraData(kSearchTermsKey, 36 navigation_entry->SetExtraData(kSearchTermsKey,
37 test_data::kSearchTerms); 37 test_data::kSearchTerms);
38 navigation_entry->GetFavicon().valid = true; 38 navigation_entry->GetFavicon().valid = true;
39 navigation_entry->GetFavicon().url = test_data::kFaviconURL; 39 navigation_entry->GetFavicon().url = test_data::kFaviconURL;
40 navigation_entry->SetHttpStatusCode(test_data::kHttpStatusCode); 40 navigation_entry->SetHttpStatusCode(test_data::kHttpStatusCode);
41 std::vector<GURL> redirect_chain; 41 std::vector<GURL> redirect_chain;
42 redirect_chain.push_back(test_data::kRedirectURL0); 42 redirect_chain.push_back(test_data::kRedirectURL0);
43 redirect_chain.push_back(test_data::kRedirectURL1); 43 redirect_chain.push_back(test_data::kRedirectURL1);
44 redirect_chain.push_back(test_data::kVirtualURL); 44 redirect_chain.push_back(test_data::kVirtualURL);
45 navigation_entry->SetRedirectChain(redirect_chain); 45 navigation_entry->SetRedirectChain(redirect_chain);
46 return navigation_entry.Pass(); 46 return navigation_entry;
47 } 47 }
48 48
49 } // namespace 49 } // namespace
50 50
51 51
52 // Create a SerializedNavigationEntry from a NavigationEntry. All its fields 52 // Create a SerializedNavigationEntry from a NavigationEntry. All its fields
53 // should match the NavigationEntry's. 53 // should match the NavigationEntry's.
54 TEST(ContentSerializedNavigationBuilderTest, FromNavigationEntry) { 54 TEST(ContentSerializedNavigationBuilderTest, FromNavigationEntry) {
55 const scoped_ptr<content::NavigationEntry> navigation_entry( 55 const scoped_ptr<content::NavigationEntry> navigation_entry(
56 MakeNavigationEntryForTest()); 56 MakeNavigationEntryForTest());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 ASSERT_EQ(3U, new_navigation_entry->GetRedirectChain().size()); 122 ASSERT_EQ(3U, new_navigation_entry->GetRedirectChain().size());
123 EXPECT_EQ(test_data::kRedirectURL0, 123 EXPECT_EQ(test_data::kRedirectURL0,
124 new_navigation_entry->GetRedirectChain()[0]); 124 new_navigation_entry->GetRedirectChain()[0]);
125 EXPECT_EQ(test_data::kRedirectURL1, 125 EXPECT_EQ(test_data::kRedirectURL1,
126 new_navigation_entry->GetRedirectChain()[1]); 126 new_navigation_entry->GetRedirectChain()[1]);
127 EXPECT_EQ(test_data::kVirtualURL, 127 EXPECT_EQ(test_data::kVirtualURL,
128 new_navigation_entry->GetRedirectChain()[2]); 128 new_navigation_entry->GetRedirectChain()[2]);
129 } 129 }
130 130
131 } // namespace sessions 131 } // namespace sessions
OLDNEW
« no previous file with comments | « components/sessions/content/content_serialized_navigation_builder.cc ('k') | components/sessions/core/base_session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698