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

Side by Side Diff: components/sessions/ios/ios_serialized_navigation_builder_unittest.cc

Issue 1586833002: Convert Pass()→std::move() for iOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental //base change Created 4 years, 11 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/ios/ios_serialized_navigation_builder.h" 5 #include "components/sessions/ios/ios_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 "ios/web/public/favicon_status.h" 9 #include "ios/web/public/favicon_status.h"
10 #include "ios/web/public/navigation_item.h" 10 #include "ios/web/public/navigation_item.h"
(...skipping 10 matching lines...) Expand all
21 web::NavigationItem::Create()); 21 web::NavigationItem::Create());
22 navigation_item->SetReferrer(web::Referrer( 22 navigation_item->SetReferrer(web::Referrer(
23 test_data::kReferrerURL, 23 test_data::kReferrerURL,
24 static_cast<web::ReferrerPolicy>(test_data::kReferrerPolicy))); 24 static_cast<web::ReferrerPolicy>(test_data::kReferrerPolicy)));
25 navigation_item->SetURL(test_data::kVirtualURL); 25 navigation_item->SetURL(test_data::kVirtualURL);
26 navigation_item->SetTitle(test_data::kTitle); 26 navigation_item->SetTitle(test_data::kTitle);
27 navigation_item->SetTransitionType(test_data::kTransitionType); 27 navigation_item->SetTransitionType(test_data::kTransitionType);
28 navigation_item->SetTimestamp(test_data::kTimestamp); 28 navigation_item->SetTimestamp(test_data::kTimestamp);
29 navigation_item->GetFavicon().valid = true; 29 navigation_item->GetFavicon().valid = true;
30 navigation_item->GetFavicon().url = test_data::kFaviconURL; 30 navigation_item->GetFavicon().url = test_data::kFaviconURL;
31 return navigation_item.Pass(); 31 return navigation_item;
32 } 32 }
33 33
34 } // namespace 34 } // namespace
35 35
36 36
37 // Create a SerializedNavigationEntry from a NavigationItem. All its fields 37 // Create a SerializedNavigationEntry from a NavigationItem. All its fields
38 // should match the NavigationItem's. 38 // should match the NavigationItem's.
39 TEST(IOSSerializedNavigationBuilderTest, FromNavigationItem) { 39 TEST(IOSSerializedNavigationBuilderTest, FromNavigationItem) {
40 const scoped_ptr<web::NavigationItem> navigation_item( 40 const scoped_ptr<web::NavigationItem> navigation_item(
41 MakeNavigationItemForTest()); 41 MakeNavigationItemForTest());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 new_navigation_item->GetVirtualURL()); 95 new_navigation_item->GetVirtualURL());
96 EXPECT_EQ(old_navigation_item->GetTitle(), 96 EXPECT_EQ(old_navigation_item->GetTitle(),
97 new_navigation_item->GetTitle()); 97 new_navigation_item->GetTitle());
98 EXPECT_EQ(ui::PAGE_TRANSITION_RELOAD, 98 EXPECT_EQ(ui::PAGE_TRANSITION_RELOAD,
99 new_navigation_item->GetTransitionType()); 99 new_navigation_item->GetTransitionType());
100 EXPECT_EQ(old_navigation_item->GetTimestamp(), 100 EXPECT_EQ(old_navigation_item->GetTimestamp(),
101 new_navigation_item->GetTimestamp()); 101 new_navigation_item->GetTimestamp());
102 } 102 }
103 103
104 } // namespace sessions 104 } // namespace sessions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698