OLD | NEW |
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_driver.h" | 5 #include "components/sessions/ios/ios_serialized_navigation_driver.h" |
6 | 6 |
7 #include "components/sessions/serialized_navigation_entry.h" | 7 #include "components/sessions/core/serialized_navigation_entry.h" |
8 #include "components/sessions/serialized_navigation_entry_test_helper.h" | 8 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" |
9 #include "ios/web/public/referrer.h" | 9 #include "ios/web/public/referrer.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace sessions { | 12 namespace sessions { |
13 | 13 |
14 // Tests that PageState data is properly sanitized when post data is present. | 14 // Tests that PageState data is properly sanitized when post data is present. |
15 TEST(IOSSerializedNavigationDriverTest, PickleSanitization) { | 15 TEST(IOSSerializedNavigationDriverTest, PickleSanitization) { |
16 IOSSerializedNavigationDriver* driver = | 16 IOSSerializedNavigationDriver* driver = |
17 IOSSerializedNavigationDriver::GetInstance(); | 17 IOSSerializedNavigationDriver::GetInstance(); |
18 SerializedNavigationEntry navigation = | 18 SerializedNavigationEntry navigation = |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 EXPECT_EQ(test_data::kSearchTerms, navigation.search_terms()); | 83 EXPECT_EQ(test_data::kSearchTerms, navigation.search_terms()); |
84 EXPECT_EQ(test_data::kFaviconURL, navigation.favicon_url()); | 84 EXPECT_EQ(test_data::kFaviconURL, navigation.favicon_url()); |
85 EXPECT_EQ(test_data::kHttpStatusCode, navigation.http_status_code()); | 85 EXPECT_EQ(test_data::kHttpStatusCode, navigation.http_status_code()); |
86 | 86 |
87 // Fields that were sanitized. | 87 // Fields that were sanitized. |
88 EXPECT_EQ(GURL(), navigation.referrer_url()); | 88 EXPECT_EQ(GURL(), navigation.referrer_url()); |
89 EXPECT_EQ(web::ReferrerPolicyDefault, navigation.referrer_policy()); | 89 EXPECT_EQ(web::ReferrerPolicyDefault, navigation.referrer_policy()); |
90 } | 90 } |
91 | 91 |
92 } // namespace sessions | 92 } // namespace sessions |
OLD | NEW |