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

Unified Diff: android_webview/native/state_serializer_unittest.cc

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sort out the tests Created 5 years 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_unittest.cc
diff --git a/android_webview/native/state_serializer_unittest.cc b/android_webview/native/state_serializer_unittest.cc
index fd897d4bdb647597b5645f3f2b7bdea7981912da..74d6e8cb63237290590d9248028bbf01d18d95f2 100644
--- a/android_webview/native/state_serializer_unittest.cc
+++ b/android_webview/native/state_serializer_unittest.cc
@@ -52,6 +52,7 @@ TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) {
const bool has_post_data = true;
const GURL original_request_url("http://original_request_url");
const GURL base_url_for_data_url("http://base_url");
+ const string data_url_as_string("data:text/html;charset=utf-8;base64,");
Tom Sepez 2015/12/09 21:30:14 can we get a test of a very large string here as w
mnaganov (inactive) 2015/12/09 22:22:52 Done.
const bool is_overriding_user_agent = true;
const base::Time timestamp = base::Time::FromInternalValue(12345);
const int http_status_code = 404;
@@ -64,6 +65,7 @@ TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) {
entry->SetHasPostData(has_post_data);
entry->SetOriginalRequestURL(original_request_url);
entry->SetBaseURLForDataURL(base_url_for_data_url);
+ entry->SetDataURLAsString(data_url_as_string);
entry->SetIsOverridingUserAgent(is_overriding_user_agent);
entry->SetTimestamp(timestamp);
entry->SetHttpStatusCode(http_status_code);
@@ -86,6 +88,7 @@ TEST(AndroidWebViewStateSerializerTest, TestNavigationEntrySerialization) {
EXPECT_EQ(has_post_data, copy->GetHasPostData());
EXPECT_EQ(original_request_url, copy->GetOriginalRequestURL());
EXPECT_EQ(base_url_for_data_url, copy->GetBaseURLForDataURL());
+ EXPECT_EQ(data_url_as_string, copy->GetDataURLAsString());
EXPECT_EQ(is_overriding_user_agent, copy->GetIsOverridingUserAgent());
EXPECT_EQ(timestamp, copy->GetTimestamp());
EXPECT_EQ(http_status_code, copy->GetHttpStatusCode());

Powered by Google App Engine
This is Rietveld 408576698