| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "android_webview/native/state_serializer.h" | 5 #include "android_webview/native/state_serializer.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 content::ContentBrowserClient browser_client; | 38 content::ContentBrowserClient browser_client; |
| 39 content::SetBrowserClientForTesting(&browser_client); | 39 content::SetBrowserClientForTesting(&browser_client); |
| 40 | 40 |
| 41 scoped_ptr<content::NavigationEntry> entry( | 41 scoped_ptr<content::NavigationEntry> entry( |
| 42 content::NavigationEntry::Create()); | 42 content::NavigationEntry::Create()); |
| 43 | 43 |
| 44 const GURL url("http://url"); | 44 const GURL url("http://url"); |
| 45 const GURL virtual_url("http://virtual_url"); | 45 const GURL virtual_url("http://virtual_url"); |
| 46 content::Referrer referrer; | 46 content::Referrer referrer; |
| 47 referrer.url = GURL("http://referrer_url"); | 47 referrer.url = GURL("http://referrer_url"); |
| 48 referrer.policy = WebKit::WebReferrerPolicyOrigin; | 48 referrer.policy = blink::WebReferrerPolicyOrigin; |
| 49 const string16 title(UTF8ToUTF16("title")); | 49 const string16 title(UTF8ToUTF16("title")); |
| 50 const content::PageState page_state = | 50 const content::PageState page_state = |
| 51 content::PageState::CreateFromEncodedData("completely bogus state"); | 51 content::PageState::CreateFromEncodedData("completely bogus state"); |
| 52 const bool has_post_data = true; | 52 const bool has_post_data = true; |
| 53 const GURL original_request_url("http://original_request_url"); | 53 const GURL original_request_url("http://original_request_url"); |
| 54 const GURL base_url_for_data_url("http://base_url"); | 54 const GURL base_url_for_data_url("http://base_url"); |
| 55 const bool is_overriding_user_agent = true; | 55 const bool is_overriding_user_agent = true; |
| 56 const base::Time timestamp = base::Time::FromInternalValue(12345); | 56 const base::Time timestamp = base::Time::FromInternalValue(12345); |
| 57 const int http_status_code = 404; | 57 const int http_status_code = 404; |
| 58 | 58 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 85 EXPECT_EQ(page_state, copy->GetPageState()); | 85 EXPECT_EQ(page_state, copy->GetPageState()); |
| 86 EXPECT_EQ(has_post_data, copy->GetHasPostData()); | 86 EXPECT_EQ(has_post_data, copy->GetHasPostData()); |
| 87 EXPECT_EQ(original_request_url, copy->GetOriginalRequestURL()); | 87 EXPECT_EQ(original_request_url, copy->GetOriginalRequestURL()); |
| 88 EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL()); | 88 EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL()); |
| 89 EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent()); | 89 EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent()); |
| 90 EXPECT_EQ(timestamp, copy->GetTimestamp()); | 90 EXPECT_EQ(timestamp, copy->GetTimestamp()); |
| 91 EXPECT_EQ(http_status_code, copy->GetHttpStatusCode()); | 91 EXPECT_EQ(http_status_code, copy->GetHttpStatusCode()); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace android_webview | 94 } // namespace android_webview |
| OLD | NEW |