| Index: content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| index e174bf8e83dfceeecfc79f9e193c4acdcf6f274b..d89c67f2f449c3b7f82a80c68fbd5786da885af8 100644
|
| --- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| +++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
|
| @@ -563,6 +563,26 @@ TEST_F(NavigationControllerTest, LoadURL_RedirectAbortDoesntShowPendingURL) {
|
| contents()->SetDelegate(NULL);
|
| }
|
|
|
| +// Test NavigationEntry is constructed correctly. No other logic tested.
|
| +TEST_F(NavigationControllerTest, PostURL) {
|
| + NavigationControllerImpl& controller = controller_impl();
|
| +
|
| + const GURL url("http://foo1");
|
| + const char* raw_data = "d\n\0a2";
|
| + const int raw_data_length = 5;
|
| + const std::vector<char> data(raw_data, raw_data + raw_data_length);
|
| +
|
| + controller.PostURL(url, content::Referrer(), data, true);
|
| +
|
| + NavigationEntryImpl* post_entry =
|
| + NavigationEntryImpl::FromNavigationEntry(
|
| + controller.GetPendingEntry());
|
| +
|
| + EXPECT_TRUE(post_entry);
|
| + EXPECT_TRUE(post_entry->GetHasPostData());
|
| + EXPECT_EQ(data, post_entry->GetBrowserInitiatedPostData());
|
| +}
|
| +
|
| TEST_F(NavigationControllerTest, Reload) {
|
| NavigationControllerImpl& controller = controller_impl();
|
| TestNotificationTracker notifications;
|
|
|