| OLD | NEW |
| 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/core/serialized_navigation_entry.h" | 5 #include "components/sessions/core/serialized_navigation_entry.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( | 124 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( |
| 125 new_navigation.transition_type(), test_data::kTransitionType)); | 125 new_navigation.transition_type(), test_data::kTransitionType)); |
| 126 EXPECT_EQ(test_data::kHasPostData, new_navigation.has_post_data()); | 126 EXPECT_EQ(test_data::kHasPostData, new_navigation.has_post_data()); |
| 127 EXPECT_EQ(test_data::kOriginalRequestURL, | 127 EXPECT_EQ(test_data::kOriginalRequestURL, |
| 128 new_navigation.original_request_url()); | 128 new_navigation.original_request_url()); |
| 129 EXPECT_EQ(test_data::kIsOverridingUserAgent, | 129 EXPECT_EQ(test_data::kIsOverridingUserAgent, |
| 130 new_navigation.is_overriding_user_agent()); | 130 new_navigation.is_overriding_user_agent()); |
| 131 EXPECT_EQ(test_data::kTimestamp, new_navigation.timestamp()); | 131 EXPECT_EQ(test_data::kTimestamp, new_navigation.timestamp()); |
| 132 EXPECT_EQ(test_data::kSearchTerms, new_navigation.search_terms()); | 132 EXPECT_EQ(test_data::kSearchTerms, new_navigation.search_terms()); |
| 133 EXPECT_EQ(test_data::kHttpStatusCode, new_navigation.http_status_code()); | 133 EXPECT_EQ(test_data::kHttpStatusCode, new_navigation.http_status_code()); |
| 134 EXPECT_EQ(test_data::kOfflinePageInfo, new_navigation.offline_page_info()); |
| 134 | 135 |
| 135 // Fields that are not written to the pickle. | 136 // Fields that are not written to the pickle. |
| 136 EXPECT_EQ(0, new_navigation.unique_id()); | 137 EXPECT_EQ(0, new_navigation.unique_id()); |
| 137 EXPECT_EQ(std::string(), new_navigation.encoded_page_state()); | 138 EXPECT_EQ(std::string(), new_navigation.encoded_page_state()); |
| 138 EXPECT_EQ(-1, new_navigation.post_id()); | 139 EXPECT_EQ(-1, new_navigation.post_id()); |
| 139 EXPECT_EQ(0U, new_navigation.redirect_chain().size()); | 140 EXPECT_EQ(0U, new_navigation.redirect_chain().size()); |
| 140 } | 141 } |
| 141 | 142 |
| 142 // Create a SerializedNavigationEntry, then create a sync protocol buffer from | 143 // Create a SerializedNavigationEntry, then create a sync protocol buffer from |
| 143 // it. The protocol buffer should have matching fields to the | 144 // it. The protocol buffer should have matching fields to the |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 constructed_nav.transition_type(); | 221 constructed_nav.transition_type(); |
| 221 | 222 |
| 222 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( | 223 EXPECT_TRUE(ui::PageTransitionTypeIncludingQualifiersIs( |
| 223 constructed_transition, transition)); | 224 constructed_transition, transition)); |
| 224 } | 225 } |
| 225 } | 226 } |
| 226 } | 227 } |
| 227 | 228 |
| 228 } // namespace | 229 } // namespace |
| 229 } // namespace sessions | 230 } // namespace sessions |
| OLD | NEW |