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

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

Issue 2937493002: [ObjC ARC] Converts components/sessions:unit_tests to ARC. (Closed)
Patch Set: fix BUILD.gn Created 3 years, 6 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
« components/sessions/BUILD.gn ('K') | « components/sessions/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "ios/web/public/referrer.h" 11 #include "ios/web/public/referrer.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
14 namespace sessions { 18 namespace sessions {
15 19
16 namespace { 20 namespace {
17 // Creates a NavigationItem from the test_data constants in 21 // Creates a NavigationItem from the test_data constants in
18 // serialized_navigation_entry_test_helper.h. 22 // serialized_navigation_entry_test_helper.h.
19 std::unique_ptr<web::NavigationItem> MakeNavigationItemForTest() { 23 std::unique_ptr<web::NavigationItem> MakeNavigationItemForTest() {
20 std::unique_ptr<web::NavigationItem> navigation_item( 24 std::unique_ptr<web::NavigationItem> navigation_item(
21 web::NavigationItem::Create()); 25 web::NavigationItem::Create());
22 navigation_item->SetReferrer(web::Referrer( 26 navigation_item->SetReferrer(web::Referrer(
23 test_data::kReferrerURL, 27 test_data::kReferrerURL,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 EXPECT_EQ(old_navigation_item->GetTitle(), 101 EXPECT_EQ(old_navigation_item->GetTitle(),
98 new_navigation_item->GetTitle()); 102 new_navigation_item->GetTitle());
99 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( 103 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs(
100 new_navigation_item->GetTransitionType(), 104 new_navigation_item->GetTransitionType(),
101 ui::PAGE_TRANSITION_RELOAD)); 105 ui::PAGE_TRANSITION_RELOAD));
102 EXPECT_EQ(old_navigation_item->GetTimestamp(), 106 EXPECT_EQ(old_navigation_item->GetTimestamp(),
103 new_navigation_item->GetTimestamp()); 107 new_navigation_item->GetTimestamp());
104 } 108 }
105 109
106 } // namespace sessions 110 } // namespace sessions
OLDNEW
« components/sessions/BUILD.gn ('K') | « components/sessions/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698