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

Unified Diff: views/view_unittest.cc

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address most TODOs and sync. Created 9 years, 9 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
Index: views/view_unittest.cc
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 2bded077b6d353af3f4330b8a42e9c04ed698798..746f3f607a833c1b009d1c3f0217751bee3e180e 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -157,7 +157,7 @@ class TestView : public View {
bool is_add, View *parent, View *child) OVERRIDE;
virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE;
virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE;
- virtual void OnMouseReleased(const MouseEvent& event, bool canceled) OVERRIDE;
+ virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE;
#if defined(TOUCH_UI)
virtual TouchStatus OnTouchEvent(const TouchEvent& event);
#endif
@@ -357,7 +357,7 @@ bool TestView::OnMouseDragged(const MouseEvent& event) {
return true;
}
-void TestView::OnMouseReleased(const MouseEvent& event, bool canceled) {
+void TestView::OnMouseReleased(const MouseEvent& event) {
last_mouse_event_type_ = event.type();
location_.SetPoint(event.x(), event.y());
}
@@ -1477,7 +1477,7 @@ TEST_F(ButtonDropDownTest, RegularClickTest) {
MouseEvent release_event(ui::ET_MOUSE_RELEASED, 1, 1,
ui::EF_LEFT_BUTTON_DOWN);
button_as_view_->OnMousePressed(press_event);
- button_as_view_->OnMouseReleased(release_event, false);
+ button_as_view_->OnMouseReleased(release_event);
EXPECT_EQ(test_dialog_->last_pressed_button_, test_dialog_->button_drop_);
}
@@ -1752,7 +1752,7 @@ TEST_F(ViewTest, TransformEvent) {
EXPECT_EQ(10, v2->location_.y());
MouseEvent released(ui::ET_MOUSE_RELEASED, 0, 0, 0);
- root->OnMouseReleased(released, false);
+ root->OnMouseReleased(released);
// Now rotate |v2| inside |v1| clockwise.
v2->SetRotation(90.0);
@@ -1773,7 +1773,7 @@ TEST_F(ViewTest, TransformEvent) {
EXPECT_EQ(10, v2->location_.x());
EXPECT_EQ(20, v2->location_.y());
- root->OnMouseReleased(released, false);
+ root->OnMouseReleased(released);
v1->ResetTransform();
v2->ResetTransform();
@@ -1804,7 +1804,7 @@ TEST_F(ViewTest, TransformEvent) {
EXPECT_EQ(10, v3->location_.x());
EXPECT_EQ(25, v3->location_.y());
- root->OnMouseReleased(released, false);
+ root->OnMouseReleased(released);
v1->ResetTransform();
v2->ResetTransform();
@@ -1836,7 +1836,7 @@ TEST_F(ViewTest, TransformEvent) {
EXPECT_EQ(10, v3->location_.x());
EXPECT_EQ(25, v3->location_.y());
- root->OnMouseReleased(released, false);
+ root->OnMouseReleased(released);
widget->CloseNow();
}

Powered by Google App Engine
This is Rietveld 408576698