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

Unified Diff: content/browser/security_exploit_browsertest.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
Index: content/browser/security_exploit_browsertest.cc
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index a7ba3d7eb8505f8a181cf266839e11dfee5201a8..cd5835c9bc99548b63e809be4ae46db8269726b1 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -195,7 +195,7 @@ class SecurityExploitBrowserTest : public ContentBrowserTest {
}
protected:
- // Tests that a given file path sent in a ViewHostMsg_RunFileChooser will
+ // Tests that a given file path sent in a FrameHostMsg_RunFileChooser will
// cause renderer to be killed.
void TestFileChooserWithPath(const base::FilePath& path);
};
@@ -206,8 +206,8 @@ void SecurityExploitBrowserTest::TestFileChooserWithPath(
NavigateToURL(shell(), foo);
EXPECT_EQ(base::ASCIIToUTF16("OK"), shell()->web_contents()->GetTitle());
- RenderViewHost* compromised_renderer =
- shell()->web_contents()->GetRenderViewHost();
+ RenderFrameHost* compromised_renderer =
+ shell()->web_contents()->GetMainFrame();
RenderProcessHostWatcher terminated(
shell()->web_contents(),
RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
@@ -215,7 +215,8 @@ void SecurityExploitBrowserTest::TestFileChooserWithPath(
FileChooserParams params;
params.default_file_name = path;
- ViewHostMsg_RunFileChooser evil(compromised_renderer->GetRoutingID(), params);
+ FrameHostMsg_RunFileChooser evil(compromised_renderer->GetRoutingID(),
+ params);
IpcSecurityTestUtil::PwnMessageReceived(
compromised_renderer->GetProcess()->GetChannel(), evil);
@@ -295,7 +296,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
}
// This is a test for crbug.com/444198. It tries to send a
-// ViewHostMsg_RunFileChooser containing an invalid path. The browser should
+// FrameHostMsg_RunFileChooser containing an invalid path. The browser should
// correctly terminate the renderer in these cases.
IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, AttemptRunFileChoosers) {
TestFileChooserWithPath(base::FilePath(FILE_PATH_LITERAL("../../*.txt")));
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698