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

Unified Diff: content/browser/web_contents/navigation_entry_impl_unittest.cc

Issue 10829044: Implement NavigationControllerWebView.PostURL (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits. Use RefCountedBytes. Created 8 years, 5 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: content/browser/web_contents/navigation_entry_impl_unittest.cc
diff --git a/content/browser/web_contents/navigation_entry_impl_unittest.cc b/content/browser/web_contents/navigation_entry_impl_unittest.cc
index 055a0cd2bcb34a9a62a2baca0661995cce5fa83b..ab535354d8179f806b2ab8322f32dcf7ad7f3d48 100644
--- a/content/browser/web_contents/navigation_entry_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_entry_impl_unittest.cc
@@ -185,6 +185,19 @@ TEST_F(NavigationEntryTest, NavigationEntryAccessors) {
EXPECT_FALSE(entry2_.get()->GetIsOverridingUserAgent());
entry2_.get()->SetIsOverridingUserAgent(true);
EXPECT_TRUE(entry2_.get()->GetIsOverridingUserAgent());
+
+ // Browser initiated post data
+ EXPECT_EQ(NULL, entry1_.get()->GetBrowserInitiatedPostData().get());
+ EXPECT_EQ(NULL, entry2_.get()->GetBrowserInitiatedPostData().get());
+ const int length = 11;
+ const unsigned char* raw_data =
+ reinterpret_cast<const unsigned char*>("post\n\n\0data");
+ std::vector<unsigned char> post_data_vector(raw_data, raw_data+length);
+ scoped_refptr<base::RefCountedBytes> post_data =
+ base::RefCountedBytes::TakeVector(&post_data_vector);
+ entry2_.get()->SetBrowserInitiatedPostData(post_data);
+ EXPECT_EQ(post_data->front(),
+ entry2_.get()->GetBrowserInitiatedPostData()->front());
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698