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

Unified Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 2030473002: ABANDONED CL: Using ResourceRequestBody as the type of browser_initiated_post_data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-resource-request-body-public
Patch Set: Rebasing... Created 4 years, 7 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
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/browser_navigator_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator_browsertest.cc
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 93c122115f6fb0a0aff947cf8b6d0de882ef3ed0..fbf57f210cfba9ceebd468fcbe3e972ee5ce5d8b 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -33,6 +33,7 @@
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/resource_request_body.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
@@ -95,8 +96,7 @@ bool BrowserNavigatorTest::OpenPOSTURLInNewForegroundTabAndGetTitle(
param.url = url;
param.is_renderer_initiated = !is_browser_initiated;
param.uses_post = true;
- param.browser_initiated_post_data = new base::RefCountedStaticMemory(
- post_data.data(), post_data.size());
+ param.post_data = content::ResourceRequestBody::CreateFromBytes(post_data);
ui_test_utils::NavigateToURL(&param);
if (!param.target_contents)
@@ -1408,7 +1408,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
EXPECT_EQ(expected_title, title);
}
-// This test verifies that renderer initiated navigations can NOT send requests
+// This test verifies that renderer initiated navigations can also send requests
// using POST.
IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
SendRendererInitiatedRequestUsingPOST) {
@@ -1422,7 +1422,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
ASSERT_TRUE(OpenPOSTURLInNewForegroundTabAndGetTitle(
embedded_test_server()->GetURL(kEchoTitleCommand), post_data, false,
&title));
- EXPECT_NE(expected_title, title);
+ EXPECT_EQ(expected_title, title);
}
// This test navigates to a data URL that contains BiDi control
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/browser_navigator_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698