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

Unified Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 1710403003: Clean up WebTaskRunner::Task subclasses in web/tests/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
index 7aeae023ddddc7a24abd700e9af6487f7f33c7c1..b63daf3846ffcc5c0c00cd8e1b270852b70a15a4 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -1345,22 +1345,13 @@ TEST_F(WebViewTest, PrintWithXHRInFlight)
m_webViewHelper.reset();
}
-class DropTask : public WebTaskRunner::Task {
-public:
- explicit DropTask(WebView* webView) : m_webView(webView)
- {
- }
-
- void run() override
- {
- const WebPoint clientPoint(0, 0);
- const WebPoint screenPoint(0, 0);
- m_webView->dragTargetDrop(clientPoint, screenPoint, 0);
- }
+static void runDropTask(WebView* webView)
+{
+ const WebPoint clientPoint(0, 0);
+ const WebPoint screenPoint(0, 0);
+ webView->dragTargetDrop(clientPoint, screenPoint, 0);
+}
-private:
- WebView* const m_webView;
-};
static void DragAndDropURL(WebViewImpl* webView, const std::string& url)
{
WebDragData dragData;
@@ -1375,7 +1366,7 @@ static void DragAndDropURL(WebViewImpl* webView, const std::string& url)
const WebPoint clientPoint(0, 0);
const WebPoint screenPoint(0, 0);
webView->dragTargetDragEnter(dragData, clientPoint, screenPoint, WebDragOperationCopy, 0);
- Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE, new DropTask(webView));
+ Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE, bind(&runDropTask, webView));
FrameTestHelpers::pumpPendingRequestsDoNotUse(webView->mainFrame());
}
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698