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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 1380
1381 WebDragData::Item item; 1381 WebDragData::Item item;
1382 item.storageType = WebDragData::Item::StorageTypeString; 1382 item.storageType = WebDragData::Item::StorageTypeString;
1383 item.stringType = "text/uri-list"; 1383 item.stringType = "text/uri-list";
1384 item.stringData = WebString::fromUTF8(url); 1384 item.stringData = WebString::fromUTF8(url);
1385 dragData.addItem(item); 1385 dragData.addItem(item);
1386 1386
1387 const WebPoint clientPoint(0, 0); 1387 const WebPoint clientPoint(0, 0);
1388 const WebPoint screenPoint(0, 0); 1388 const WebPoint screenPoint(0, 0);
1389 webView->dragTargetDragEnter(dragData, clientPoint, screenPoint, WebDragOper ationCopy, 0); 1389 webView->dragTargetDragEnter(dragData, clientPoint, screenPoint, WebDragOper ationCopy, 0);
1390 webView->dragTargetDrop(clientPoint, screenPoint, 0); 1390 webView->dragTargetDrop(dragData, clientPoint, screenPoint, 0);
1391 FrameTestHelpers::pumpPendingRequestsForFrameToLoad(webView->mainFrame()); 1391 FrameTestHelpers::pumpPendingRequestsForFrameToLoad(webView->mainFrame());
1392 } 1392 }
1393 1393
1394 TEST_F(WebViewTest, DragDropURL) 1394 TEST_F(WebViewTest, DragDropURL)
1395 { 1395 {
1396 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), "foo.html"); 1396 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), "foo.html");
1397 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), "bar.html"); 1397 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), "bar.html");
1398 1398
1399 const std::string fooUrl = m_baseURL + "foo.html"; 1399 const std::string fooUrl = m_baseURL + "foo.html";
1400 const std::string barUrl = m_baseURL + "bar.html"; 1400 const std::string barUrl = m_baseURL + "bar.html";
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
3177 frame->setAutofillClient(&client); 3177 frame->setAutofillClient(&client);
3178 webView->setInitialFocus(false); 3178 webView->setInitialFocus(false);
3179 3179
3180 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str()))); 3180 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str())));
3181 EXPECT_EQ(1, client.textChangesFromUserGesture()); 3181 EXPECT_EQ(1, client.textChangesFromUserGesture());
3182 EXPECT_FALSE(UserGestureIndicator::processingUserGesture()); 3182 EXPECT_FALSE(UserGestureIndicator::processingUserGesture());
3183 frame->setAutofillClient(0); 3183 frame->setAutofillClient(0);
3184 } 3184 }
3185 3185
3186 } // namespace blink 3186 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698