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

Side by Side Diff: chrome/browser/ui/views/drag_and_drop_interactive_uitest.h

Issue 2622733002: Mac Support for drag-and-drop tests that start dragging via mouse simulation.
Patch Set: . Created 3 years, 11 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 | « no previous file | chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_DRAG_AND_DROP_INTERACTIVE_UITEST_H_
6 #define CHROME_BROWSER_UI_VIEWS_DRAG_AND_DROP_INTERACTIVE_UITEST_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/macros.h"
12
13 namespace content {
14 class WebContents;
15 } // namespace content
16
17 namespace gfx {
18 class Point;
19 } // namespace gfx
20
21 // Test helper for simulating drag and drop happening in WebContents.
22 class ExternalDragEnterSimulator {
23 public:
24 static std::unique_ptr<ExternalDragEnterSimulator> Create(
25 content::WebContents* web_contents);
26
27 virtual ~ExternalDragEnterSimulator() {}
28
29 // Simulates notification that |text| was dragged from outside of the browser,
30 // into the specified |location| inside |web_contents|.
31 // |location| is relative to |web_contents|.
32 // Returns true upon success.
33 virtual bool SimulateDragEnter(const gfx::Point& location,
34 const std::string& text) = 0;
35
36 // Simulates dropping of the drag-and-dropped item.
37 // SimulateDragEnter needs to be called first.
38 // Returns true upon success.
39 virtual bool SimulateDrop(const gfx::Point& location);
40
41 protected:
42 ExternalDragEnterSimulator() = default;
43
44 private:
45 DISALLOW_COPY_AND_ASSIGN(ExternalDragEnterSimulator);
46 };
47
48 #endif // CHROME_BROWSER_UI_VIEWS_DRAG_AND_DROP_INTERACTIVE_UITEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698