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" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "content/public/browser/content_browser_client.h" | 13 #include "content/public/browser/content_browser_client.h" |
14 #include "content/public/browser/navigation_entry.h" | 14 #include "content/public/browser/navigation_entry.h" |
15 #include "content/public/common/content_client.h" | 15 #include "content/public/common/content_client.h" |
16 #include "content/public/common/page_state.h" | 16 #include "content/public/common/page_state.h" |
17 #include "googleurl/src/gurl.h" | |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "url/gurl.h" |
19 | 19 |
20 using std::string; | 20 using std::string; |
21 | 21 |
22 namespace android_webview { | 22 namespace android_webview { |
23 | 23 |
24 TEST(AndroidWebViewStateSerializerTest, TestHeaderSerialization) { | 24 TEST(AndroidWebViewStateSerializerTest, TestHeaderSerialization) { |
25 Pickle pickle; | 25 Pickle pickle; |
26 bool result = internal::WriteHeaderToPickle(&pickle); | 26 bool result = internal::WriteHeaderToPickle(&pickle); |
27 EXPECT_TRUE(result); | 27 EXPECT_TRUE(result); |
28 | 28 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 EXPECT_EQ(title, copy->GetTitle()); | 82 EXPECT_EQ(title, copy->GetTitle()); |
83 EXPECT_EQ(page_state, copy->GetPageState()); | 83 EXPECT_EQ(page_state, copy->GetPageState()); |
84 EXPECT_EQ(has_post_data, copy->GetHasPostData()); | 84 EXPECT_EQ(has_post_data, copy->GetHasPostData()); |
85 EXPECT_EQ(original_request_url, copy->GetOriginalRequestURL()); | 85 EXPECT_EQ(original_request_url, copy->GetOriginalRequestURL()); |
86 EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL()); | 86 EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL()); |
87 EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent()); | 87 EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent()); |
88 EXPECT_EQ(timestamp, copy->GetTimestamp()); | 88 EXPECT_EQ(timestamp, copy->GetTimestamp()); |
89 } | 89 } |
90 | 90 |
91 } // namespace android_webview | 91 } // namespace android_webview |
OLD | NEW |