OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "chrome/browser/sessions/chrome_serialized_navigation_driver.h" | 5 #include "chrome/browser/sessions/chrome_serialized_navigation_driver.h" |
6 | 6 |
7 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" | 7 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" |
8 #include "content/public/common/page_state.h" | 8 #include "content/public/common/page_state.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 10 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 EXPECT_EQ(sessions::test_data::kSearchTerms, navigation.search_terms()); | 100 EXPECT_EQ(sessions::test_data::kSearchTerms, navigation.search_terms()); |
101 EXPECT_EQ(sessions::test_data::kFaviconURL, navigation.favicon_url()); | 101 EXPECT_EQ(sessions::test_data::kFaviconURL, navigation.favicon_url()); |
102 EXPECT_EQ(sessions::test_data::kHttpStatusCode, | 102 EXPECT_EQ(sessions::test_data::kHttpStatusCode, |
103 navigation.http_status_code()); | 103 navigation.http_status_code()); |
104 | 104 |
105 // Fields that were sanitized. | 105 // Fields that were sanitized. |
106 EXPECT_EQ(GURL(), navigation.referrer_url()); | 106 EXPECT_EQ(GURL(), navigation.referrer_url()); |
107 EXPECT_EQ(blink::kWebReferrerPolicyDefault, navigation.referrer_policy()); | 107 EXPECT_EQ(blink::kWebReferrerPolicyDefault, navigation.referrer_policy()); |
108 EXPECT_EQ(page_state.ToEncodedData(), navigation.encoded_page_state()); | 108 EXPECT_EQ(page_state.ToEncodedData(), navigation.encoded_page_state()); |
109 } | 109 } |
| 110 |
| 111 // TODO(dbeam): add tests for clearing session restore state from new Material |
| 112 // Design URLs that we're pulling out of the uber page. |
OLD | NEW |