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/serialized_navigation_entry_test_helper.h" | 5 #include "components/sessions/serialized_navigation_entry_test_helper.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "components/sessions/serialized_navigation_entry.h" | 9 #include "components/sessions/serialized_navigation_entry.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 // static | 32 // static |
33 SerializedNavigationEntry SerializedNavigationEntryTestHelper::CreateNavigation( | 33 SerializedNavigationEntry SerializedNavigationEntryTestHelper::CreateNavigation( |
34 const std::string& virtual_url, | 34 const std::string& virtual_url, |
35 const std::string& title) { | 35 const std::string& title) { |
36 SerializedNavigationEntry navigation; | 36 SerializedNavigationEntry navigation; |
37 navigation.index_ = 0; | 37 navigation.index_ = 0; |
38 navigation.referrer_ = | 38 navigation.referrer_ = |
39 content::Referrer(GURL("http://www.referrer.com"), | 39 content::Referrer(GURL("http://www.referrer.com"), |
40 WebKit::WebReferrerPolicyDefault); | 40 blink::WebReferrerPolicyDefault); |
41 navigation.virtual_url_ = GURL(virtual_url); | 41 navigation.virtual_url_ = GURL(virtual_url); |
42 navigation.title_ = UTF8ToUTF16(title); | 42 navigation.title_ = UTF8ToUTF16(title); |
43 navigation.page_state_ = | 43 navigation.page_state_ = |
44 content::PageState::CreateFromEncodedData("fake_state"); | 44 content::PageState::CreateFromEncodedData("fake_state"); |
45 navigation.timestamp_ = base::Time::Now(); | 45 navigation.timestamp_ = base::Time::Now(); |
46 navigation.http_status_code_ = 200; | 46 navigation.http_status_code_ = 200; |
47 return navigation; | 47 return navigation; |
48 } | 48 } |
49 | 49 |
50 // static | 50 // static |
(...skipping 25 matching lines...) Expand all Loading... |
76 } | 76 } |
77 | 77 |
78 // static | 78 // static |
79 void SerializedNavigationEntryTestHelper::SetTimestamp( | 79 void SerializedNavigationEntryTestHelper::SetTimestamp( |
80 base::Time timestamp, | 80 base::Time timestamp, |
81 SerializedNavigationEntry* navigation) { | 81 SerializedNavigationEntry* navigation) { |
82 navigation->timestamp_ = timestamp; | 82 navigation->timestamp_ = timestamp; |
83 } | 83 } |
84 | 84 |
85 } // namespace sessions | 85 } // namespace sessions |
OLD | NEW |