Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: android_webview/native/state_serializer_unittests.cc

Issue 22837005: Add HTTP status code to navigation data structures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bug Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/native/state_serializer_unittests.cc
diff --git a/android_webview/native/state_serializer_unittests.cc b/android_webview/native/state_serializer_unittests.cc
index f592d29ddf524fa37c4564e8920ae07fb9a23931..408c8888b4b51fdb27401a95258a7ddd9d7193d4 100644
--- a/android_webview/native/state_serializer_unittests.cc
+++ b/android_webview/native/state_serializer_unittests.cc
@@ -54,6 +54,7 @@ TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) {
const GURL base_url_for_data_url("http://base_url");
const bool is_overriding_user_agent = true;
const base::Time timestamp = base::Time::FromInternalValue(12345);
+ const int http_status_code = 404;
entry->SetURL(url);
entry->SetVirtualURL(virtual_url);
@@ -65,6 +66,7 @@ TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) {
entry->SetBaseURLForDataURL(base_url_for_data_url);
entry->SetIsOverridingUserAgent(is_overriding_user_agent);
entry->SetTimestamp(timestamp);
+ entry->SetHttpStatusCode(http_status_code);
Pickle pickle;
bool result = internal::WriteNavigationEntryToPickle(*entry, &pickle);
@@ -86,6 +88,7 @@ TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) {
EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL());
EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent());
EXPECT_EQ(timestamp, copy->GetTimestamp());
+ EXPECT_EQ(http_status_code, copy->GetHttpStatusCode());
}
} // namespace android_webview
« no previous file with comments | « android_webview/native/state_serializer.cc ('k') | chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698