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

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

Issue 2038233002: Using ResourceRequestBody as the type of HTTP body outside of //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-resource-request-body-public
Patch Set: Rebasing... Created 4 years, 6 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 7b1362d34f1611ba805afc4dbf2fe52d5a034867..8debfe8d880d14fb762c4951f8a0147d7a4f1a6f 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,7 +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(
+ param.post_data = content::ResourceRequestBody::CreateFromBytes(
post_data.data(), post_data.size());
ui_test_utils::NavigateToURL(&param);
@@ -1402,7 +1403,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) {
@@ -1416,7 +1417,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