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

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 comments, fix tests, cleanup, etc. 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
« no previous file with comments | « views/view.cc ('k') | views/widget/root_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view_unittest.cc
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index 428f3206ab030b0e1334d067ed7d416655bedf79..32a23af272c4d72d241eeba0781b168c72c0980a 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());
}
@@ -1478,7 +1478,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_);
}
@@ -1753,7 +1753,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);
@@ -1774,7 +1774,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();
@@ -1805,7 +1805,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();
@@ -1837,7 +1837,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();
}
« no previous file with comments | « views/view.cc ('k') | views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698