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

Unified Diff: content/browser/renderer_host/render_view_host_unittest.cc

Issue 1723763002: Add WebDragData to blink::WebView::dragtargetDrop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review 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/renderer_host/render_view_host_unittest.cc
diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc
index 7e3746cea992fbd9993c2886e1d16bb79e09a9df..717699f544e953f6f70abade014808572737eb3c 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_unittest.cc
@@ -173,6 +173,7 @@ TEST_F(RenderViewHostTest, DragEnteredFileURLsStillBlocked) {
dropped_data.filenames.push_back(
ui::FileInfo(dragged_file_path, base::FilePath()));
+ rvh()->FilterDropData(&dropped_data);
rvh()->DragTargetDragEnter(dropped_data, client_point, screen_point,
blink::WebDragOperationNone, 0);
@@ -180,10 +181,11 @@ TEST_F(RenderViewHostTest, DragEnteredFileURLsStillBlocked) {
ChildProcessSecurityPolicyImpl* policy =
ChildProcessSecurityPolicyImpl::GetInstance();
+ // Permissions are not granted at DragEnter.
EXPECT_FALSE(policy->CanRequestURL(id, highlighted_file_url));
EXPECT_FALSE(policy->CanReadFile(id, highlighted_file_path));
- EXPECT_TRUE(policy->CanRequestURL(id, dragged_file_url));
- EXPECT_TRUE(policy->CanReadFile(id, dragged_file_path));
+ EXPECT_FALSE(policy->CanRequestURL(id, dragged_file_url));
+ EXPECT_FALSE(policy->CanReadFile(id, dragged_file_path));
EXPECT_FALSE(policy->CanRequestURL(id, sensitive_file_url));
EXPECT_FALSE(policy->CanReadFile(id, sensitive_file_path));
}
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698