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

Unified Diff: ui/aura/test/ui_controls_factory_ozone.cc

Issue 2851333002: Revert of Fix an interactive ui test (Closed)
Patch Set: Created 3 years, 8 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 | « chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/ui_controls_factory_ozone.cc
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
index cc3589e4778bbc6d7d27b45374e40899a740ffec..403757b947503c7c2cf344760960eb90af5a6937 100644
--- a/ui/aura/test/ui_controls_factory_ozone.cc
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -21,9 +21,6 @@
namespace test {
namespace {
-// Mask of the mouse buttons currently down.
-unsigned g_button_down_mask = 0;
-
class UIControlsOzone : public ui_controls::UIControlsAura {
public:
UIControlsOzone(WindowTreeHost* host) : host_(host) {}
@@ -45,7 +42,7 @@
bool alt,
bool command,
const base::Closure& closure) override {
- int flags = g_button_down_mask;
+ int flags = button_down_mask_;
if (control) {
flags |= ui::EF_CONTROL_DOWN;
@@ -114,12 +111,12 @@
ui::EventType event_type;
- if (g_button_down_mask)
+ if (button_down_mask_)
event_type = ui::ET_MOUSE_DRAGGED;
else
event_type = ui::ET_MOUSE_MOVED;
- PostMouseEvent(event_type, host_location, g_button_down_mask, 0);
+ PostMouseEvent(event_type, host_location, button_down_mask_, 0);
RunClosureAfterAllPendingUIEvents(closure);
return true;
@@ -160,14 +157,14 @@
}
if (state & ui_controls::DOWN) {
- g_button_down_mask |= flag;
+ button_down_mask_ |= flag;
PostMouseEvent(ui::ET_MOUSE_PRESSED, host_location,
- g_button_down_mask | flag, flag);
+ button_down_mask_ | flag, flag);
}
if (state & ui_controls::UP) {
- g_button_down_mask &= ~flag;
+ button_down_mask_ &= ~flag;
PostMouseEvent(ui::ET_MOUSE_RELEASED, host_location,
- g_button_down_mask | flag, flag);
+ button_down_mask_ | flag, flag);
}
RunClosureAfterAllPendingUIEvents(closure);
@@ -232,6 +229,9 @@
WindowTreeHost* host_;
+ // Mask of the mouse buttons currently down.
+ unsigned button_down_mask_ = 0;
+
DISALLOW_COPY_AND_ASSIGN(UIControlsOzone);
};
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698