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/content/content_serialized_navigation_driver.h" | 5 #include "components/sessions/content/content_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 "content/public/common/page_state.h" | 9 #include "content/public/common/page_state.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 11 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
12 | 12 |
13 namespace sessions { | 13 namespace sessions { |
14 | 14 |
15 // Tests that PageState data is properly sanitized when post data is present. | 15 // Tests that PageState data is properly sanitized when post data is present. |
16 TEST(ContentSerializedNavigationDriverTest, PickleSanitizationWithPostData) { | 16 TEST(ContentSerializedNavigationDriverTest, PickleSanitizationWithPostData) { |
17 ContentSerializedNavigationDriver* driver = | 17 ContentSerializedNavigationDriver* driver = |
18 ContentSerializedNavigationDriver::GetInstance(); | 18 ContentSerializedNavigationDriver::GetInstance(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 EXPECT_EQ(test_data::kFaviconURL, navigation.favicon_url()); | 108 EXPECT_EQ(test_data::kFaviconURL, navigation.favicon_url()); |
109 EXPECT_EQ(test_data::kHttpStatusCode, navigation.http_status_code()); | 109 EXPECT_EQ(test_data::kHttpStatusCode, navigation.http_status_code()); |
110 | 110 |
111 // Fields that were sanitized. | 111 // Fields that were sanitized. |
112 EXPECT_EQ(GURL(), navigation.referrer_url()); | 112 EXPECT_EQ(GURL(), navigation.referrer_url()); |
113 EXPECT_EQ(blink::WebReferrerPolicyDefault, navigation.referrer_policy()); | 113 EXPECT_EQ(blink::WebReferrerPolicyDefault, navigation.referrer_policy()); |
114 EXPECT_EQ(page_state.ToEncodedData(), navigation.encoded_page_state()); | 114 EXPECT_EQ(page_state.ToEncodedData(), navigation.encoded_page_state()); |
115 } | 115 } |
116 | 116 |
117 } // namespace sessions | 117 } // namespace sessions |
OLD | NEW |