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

Unified Diff: chrome/browser/ui/webui/webui_webview_browsertest.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
« no previous file with comments | « no previous file | components/test_runner/event_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/webui_webview_browsertest.cc
diff --git a/chrome/browser/ui/webui/webui_webview_browsertest.cc b/chrome/browser/ui/webui/webui_webview_browsertest.cc
index df45cac57bb11b838e9d36557bace9956abf1acd..4c56d5d63d22156a5a8b92f0279f25d9eda74733 100644
--- a/chrome/browser/ui/webui/webui_webview_browsertest.cc
+++ b/chrome/browser/ui/webui/webui_webview_browsertest.cc
@@ -303,6 +303,10 @@ IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DragAndDropToInput) {
static_cast<blink::WebDragOperationsMask>(blink::WebDragOperationCopy |
blink::WebDragOperationLink |
blink::WebDragOperationMove);
+ content::DropData dropdata;
+ dropdata.did_originate_from_renderer = true;
+ dropdata.url = GURL(url::kAboutBlankURL);
+ dropdata.url_title = base::string16(base::ASCIIToUTF16("Drop me"));
// Drag url into input in webview.
@@ -310,13 +314,9 @@ IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DragAndDropToInput) {
EXPECT_TRUE(content::ExecuteScript(embedder_web_contents,
"console.log('step1: Drag Enter')"));
- content::DropData dropdata;
- dropdata.did_originate_from_renderer = true;
- dropdata.url = GURL(url::kAboutBlankURL);
- dropdata.url_title = base::string16(base::ASCIIToUTF16("Drop me"));
-
WebUIMessageListener listener(embedder_web_contents->GetWebUI(),
"Step1: destNode gets dragenter");
+ render_view_host->FilterDropData(&dropdata);
render_view_host->DragTargetDragEnter(dropdata, client_pt, screen_pt,
drag_operation_mask,
blink::WebInputEvent::LeftButtonDown);
@@ -342,7 +342,7 @@ IN_PROC_BROWSER_TEST_F(WebUIWebViewBrowserTest, DragAndDropToInput) {
DNDToInputNavigationObserver observer(embedder_web_contents);
WebUIMessageListener listener(embedder_web_contents->GetWebUI(),
"Step3: destNode gets drop");
- render_view_host->DragTargetDrop(client_pt, screen_pt, 0);
+ render_view_host->DragTargetDrop(dropdata, client_pt, screen_pt, 0);
ASSERT_TRUE(listener.Wait());
// Confirm no navigation
EXPECT_FALSE(observer.Navigated());
« no previous file with comments | « no previous file | components/test_runner/event_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698