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

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

Issue 2038813003: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 #include <tuple> 7 #include <tuple>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 RequestNavigationParams request_params; 604 RequestNavigationParams request_params;
605 common_params.url = GURL("data:text/html,<div>Page</div>"); 605 common_params.url = GURL("data:text/html,<div>Page</div>");
606 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL; 606 common_params.navigation_type = FrameMsg_Navigate_Type::NORMAL;
607 common_params.transition = ui::PAGE_TRANSITION_TYPED; 607 common_params.transition = ui::PAGE_TRANSITION_TYPED;
608 common_params.method = "POST"; 608 common_params.method = "POST";
609 request_params.page_id = -1; 609 request_params.page_id = -1;
610 610
611 // Set up post data. 611 // Set up post data.
612 const char raw_data[] = "post \0\ndata"; 612 const char raw_data[] = "post \0\ndata";
613 const size_t length = arraysize(raw_data); 613 const size_t length = arraysize(raw_data);
614 scoped_refptr<ResourceRequestBody> post_data(new ResourceRequestBody); 614 scoped_refptr<ResourceRequestBodyImpl> post_data(new ResourceRequestBodyImpl);
615 post_data->AppendBytes(raw_data, length); 615 post_data->AppendBytes(raw_data, length);
616 common_params.post_data = post_data; 616 common_params.post_data = post_data;
617 617
618 frame()->Navigate(common_params, start_params, request_params); 618 frame()->Navigate(common_params, start_params, request_params);
619 ProcessPendingMessages(); 619 ProcessPendingMessages();
620 620
621 const IPC::Message* frame_navigate_msg = 621 const IPC::Message* frame_navigate_msg =
622 render_thread_->sink().GetUniqueMessageMatching( 622 render_thread_->sink().GetUniqueMessageMatching(
623 FrameHostMsg_DidCommitProvisionalLoad::ID); 623 FrameHostMsg_DidCommitProvisionalLoad::ID);
624 EXPECT_TRUE(frame_navigate_msg); 624 EXPECT_TRUE(frame_navigate_msg);
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after
2502 "," 2502 ","
2503 "\"functionDeclaration\":\"function foo(){ " 2503 "\"functionDeclaration\":\"function foo(){ "
2504 "Promise.resolve().then(() => " 2504 "Promise.resolve().then(() => "
2505 "console.log(239))}\"" 2505 "console.log(239))}\""
2506 "}" 2506 "}"
2507 "}"); 2507 "}");
2508 EXPECT_EQ(1, CountNotifications("Console.messageAdded")); 2508 EXPECT_EQ(1, CountNotifications("Console.messageAdded"));
2509 } 2509 }
2510 2510
2511 } // namespace content 2511 } // 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