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

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: always reset ignore_dragged_url_ 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..610e4a63e7dd0c1cb2b51af8f2e165486a73c276 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_unittest.cc
@@ -170,9 +170,11 @@ TEST_F(RenderViewHostTest, DragEnteredFileURLsStillBlocked) {
GURL dragged_file_url = net::FilePathToFileURL(dragged_file_path);
GURL sensitive_file_url = net::FilePathToFileURL(sensitive_file_path);
dropped_data.url = highlighted_file_url;
+ dropped_data.has_url = true;
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 +182,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));
}

Powered by Google App Engine
This is Rietveld 408576698