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

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

Issue 101573006: Changes MouseEvent constructor to take changed_button_flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test; needs updated expectations as mouse entered wasnt sent before because of env::mouse_butto… Created 7 years 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 | « ui/aura/root_window_unittest.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/event_generator.cc
diff --git a/ui/aura/test/event_generator.cc b/ui/aura/test/event_generator.cc
index f11ab214f069553e7015bd166c8f5cd8b18de2d4..7625a11f726ed8fccdb2837983280c8770ad7d4f 100644
--- a/ui/aura/test/event_generator.cc
+++ b/ui/aura/test/event_generator.cc
@@ -150,14 +150,14 @@ void EventGenerator::SendMouseExit() {
gfx::Point exit_location(current_location_);
ConvertPointToTarget(current_root_window_->window(), &exit_location);
ui::MouseEvent mouseev(ui::ET_MOUSE_EXITED, exit_location, exit_location,
- flags_);
+ flags_, 0);
Dispatch(&mouseev);
}
void EventGenerator::MoveMouseToInHost(const gfx::Point& point_in_host) {
const ui::EventType event_type = (flags_ & ui::EF_LEFT_MOUSE_BUTTON) ?
ui::ET_MOUSE_DRAGGED : ui::ET_MOUSE_MOVED;
- ui::MouseEvent mouseev(event_type, point_in_host, point_in_host, flags_);
+ ui::MouseEvent mouseev(event_type, point_in_host, point_in_host, flags_, 0);
Dispatch(&mouseev);
current_location_ = point_in_host;
@@ -178,7 +178,7 @@ void EventGenerator::MoveMouseTo(const gfx::Point& point_in_screen,
if (!grab_)
UpdateCurrentRootWindow(move_point);
ConvertPointToTarget(current_root_window_->window(), &move_point);
- ui::MouseEvent mouseev(event_type, move_point, move_point, flags_);
+ ui::MouseEvent mouseev(event_type, move_point, move_point, flags_, 0);
Dispatch(&mouseev);
}
current_location_ = point_in_screen;
@@ -511,7 +511,8 @@ void EventGenerator::PressButton(int flag) {
flags_ |= flag;
grab_ = flags_ & kAllButtonMask;
gfx::Point location = GetLocationInCurrentRoot();
- ui::MouseEvent mouseev(ui::ET_MOUSE_PRESSED, location, location, flags_);
+ ui::MouseEvent mouseev(ui::ET_MOUSE_PRESSED, location, location, flags_,
+ flag);
Dispatch(&mouseev);
}
}
@@ -520,7 +521,7 @@ void EventGenerator::ReleaseButton(int flag) {
if (flags_ & flag) {
gfx::Point location = GetLocationInCurrentRoot();
ui::MouseEvent mouseev(ui::ET_MOUSE_RELEASED, location,
- location, flags_);
+ location, flags_, flag);
Dispatch(&mouseev);
flags_ ^= flag;
}
« no previous file with comments | « ui/aura/root_window_unittest.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698