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

Side by Side Diff: views/controls/single_split_view_unittest.cc

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refinements, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 #include "testing/gmock/include/gmock/gmock.h" 6 #include "testing/gmock/include/gmock/gmock.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "views/controls/single_split_view.h" 8 #include "views/controls/single_split_view.h"
9 9
10 using ::testing::_; 10 using ::testing::_;
11 using ::testing::Return; 11 using ::testing::Return;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 MouseEvent mouse_dragged_2( 159 MouseEvent mouse_dragged_2(
160 ui::ET_MOUSE_DRAGGED, 6, 160 ui::ET_MOUSE_DRAGGED, 6,
161 kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2, 0); 161 kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2, 0);
162 ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_2)); 162 ASSERT_TRUE(split.OnMouseDragged(mouse_dragged_2));
163 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2, 163 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2,
164 split.divider_offset()); 164 split.divider_offset());
165 165
166 MouseEvent mouse_released( 166 MouseEvent mouse_released(
167 ui::ET_MOUSE_RELEASED, 7, 167 ui::ET_MOUSE_RELEASED, 7,
168 kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2, 0); 168 kInitialDividerOffset + kMouseOffset + kMouseMoveDelta * 2, 0);
169 split.OnMouseReleased(mouse_released, false); 169 // TODO(msw): Wasn't SingleSplitView::OnMouseReleased(foo, *false*) a no-op?
msw 2011/03/17 23:28:51 Need guidance / testing / revision history researc
170 split.OnMouseReleased(mouse_released);
170 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2, 171 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2,
171 split.divider_offset()); 172 split.divider_offset());
172 } 173 }
173 174
174 } // namespace views 175 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698