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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 2008613002: ABANDONED CL: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@post-data-my-stuff
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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/test/test_render_frame.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 RequestNavigationParams request_params; 603 RequestNavigationParams request_params;
604 common_params.url = GURL("data:text/html,<div>Page</div>"); 604 common_params.url = GURL("data:text/html,<div>Page</div>");
605 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL; 605 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL;
606 common_params.transition = ui::PAGE_TRANSITION_TYPED; 606 common_params.transition = ui::PAGE_TRANSITION_TYPED;
607 common_params.method = "POST"; 607 common_params.method = "POST";
608 request_params.page_id = -1; 608 request_params.page_id = -1;
609 609
610 // Set up post data. 610 // Set up post data.
611 const char raw_data[] = "post \0\ndata"; 611 const char raw_data[] = "post \0\ndata";
612 const size_t length = arraysize(raw_data); 612 const size_t length = arraysize(raw_data);
613 scoped_refptr<ResourceRequestBody> post_data(new ResourceRequestBody); 613 scoped_refptr<ResourceRequestBodyImpl> post_data(new ResourceRequestBodyImpl);
614 post_data->AppendBytes(raw_data, length); 614 post_data->AppendBytes(raw_data, length);
615 common_params.post_data = post_data; 615 common_params.post_data = post_data;
616 616
617 frame()->Navigate(common_params, start_params, request_params); 617 frame()->Navigate(common_params, start_params, request_params);
618 ProcessPendingMessages(); 618 ProcessPendingMessages();
619 619
620 const IPC::Message* frame_navigate_msg = 620 const IPC::Message* frame_navigate_msg =
621 render_thread_->sink().GetUniqueMessageMatching( 621 render_thread_->sink().GetUniqueMessageMatching(
622 FrameHostMsg_DidCommitProvisionalLoad::ID); 622 FrameHostMsg_DidCommitProvisionalLoad::ID);
623 EXPECT_TRUE(frame_navigate_msg); 623 EXPECT_TRUE(frame_navigate_msg);
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 "," 2501 ","
2502 "\"functionDeclaration\":\"function foo(){ " 2502 "\"functionDeclaration\":\"function foo(){ "
2503 "Promise.resolve().then(() => " 2503 "Promise.resolve().then(() => "
2504 "console.log(239))}\"" 2504 "console.log(239))}\""
2505 "}" 2505 "}"
2506 "}"); 2506 "}");
2507 EXPECT_EQ(1, CountNotifications("Console.messageAdded")); 2507 EXPECT_EQ(1, CountNotifications("Console.messageAdded"));
2508 } 2508 }
2509 2509
2510 } // namespace content 2510 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/test/test_render_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698