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

Unified Diff: content/renderer/pepper/pepper_file_chooser_host_unittest.cc

Issue 2050623005: Move file chooser from RenderView(Host) to RenderFrame(Host). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes based on reviews. 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 | « content/renderer/pepper/pepper_file_chooser_host.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_file_chooser_host_unittest.cc
diff --git a/content/renderer/pepper/pepper_file_chooser_host_unittest.cc b/content/renderer/pepper/pepper_file_chooser_host_unittest.cc
index 85d8c91fb5110437086f574f0e007bc86cae8701..d610636955d073da3961d6f9f9d0d7fd771dd048 100644
--- a/content/renderer/pepper/pepper_file_chooser_host_unittest.cc
+++ b/content/renderer/pepper/pepper_file_chooser_host_unittest.cc
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
+#include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
#include "content/public/common/file_chooser_file_info.h"
#include "content/public/common/file_chooser_params.h"
@@ -92,10 +93,10 @@ TEST_F(PepperFileChooserHostTest, Show) {
// The render view should have sent a chooser request to the browser
// (caught by the render thread's test message sink).
const IPC::Message* msg = render_thread_->sink().GetUniqueMessageMatching(
- ViewHostMsg_RunFileChooser::ID);
+ FrameHostMsg_RunFileChooser::ID);
ASSERT_TRUE(msg);
- ViewHostMsg_RunFileChooser::Schema::Param call_msg_param;
- ASSERT_TRUE(ViewHostMsg_RunFileChooser::Read(msg, &call_msg_param));
+ FrameHostMsg_RunFileChooser::Schema::Param call_msg_param;
+ ASSERT_TRUE(FrameHostMsg_RunFileChooser::Read(msg, &call_msg_param));
const FileChooserParams& chooser_params = std::get<0>(call_msg_param);
// Basic validation of request.
@@ -110,10 +111,11 @@ TEST_F(PepperFileChooserHostTest, Show) {
selected_info.file_path = base::FilePath(FILE_PATH_LITERAL("myp\\ath/foo"));
std::vector<content::FileChooserFileInfo> selected_info_vector;
selected_info_vector.push_back(selected_info);
- RenderViewImpl* view_impl = static_cast<RenderViewImpl*>(view_);
- ViewMsg_RunFileChooserResponse response(view_impl->GetRoutingID(),
- selected_info_vector);
- EXPECT_TRUE(view_impl->OnMessageReceived(response));
+ RenderFrameImpl* frame_impl =
+ static_cast<RenderFrameImpl*>(view_->GetMainRenderFrame());
+ FrameMsg_RunFileChooserResponse response(frame_impl->GetRoutingID(),
+ selected_info_vector);
+ EXPECT_TRUE(frame_impl->OnMessageReceived(response));
// This should have sent the Pepper reply to our test sink.
ppapi::proxy::ResourceMessageReplyParams reply_params;
« no previous file with comments | « content/renderer/pepper/pepper_file_chooser_host.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698