| OLD | NEW |
| 1 // Copyright (c) 2011 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 "ui/views/controls/single_split_view.h" |
| 9 #include "views/controls/single_split_view_listener.h" | 9 #include "ui/views/controls/single_split_view_listener.h" |
| 10 | 10 |
| 11 using ::testing::_; | 11 using ::testing::_; |
| 12 using ::testing::Return; | 12 using ::testing::Return; |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 static void VerifySplitViewLayout(const views::SingleSplitView& split) { | 16 static void VerifySplitViewLayout(const views::SingleSplitView& split) { |
| 17 ASSERT_EQ(2, split.child_count()); | 17 ASSERT_EQ(2, split.child_count()); |
| 18 | 18 |
| 19 const views::View* leading = split.child_at(0); | 19 const views::View* leading = split.child_at(0); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2, | 171 EXPECT_EQ(kInitialDividerOffset + kMouseMoveDelta * 2, |
| 172 split.divider_offset()); | 172 split.divider_offset()); |
| 173 | 173 |
| 174 // Expect intial offset after a system/user gesture cancels the drag. | 174 // Expect intial offset after a system/user gesture cancels the drag. |
| 175 // This shouldn't occur after mouse release, but it's sufficient for testing. | 175 // This shouldn't occur after mouse release, but it's sufficient for testing. |
| 176 split.OnMouseCaptureLost(); | 176 split.OnMouseCaptureLost(); |
| 177 EXPECT_EQ(kInitialDividerOffset, split.divider_offset()); | 177 EXPECT_EQ(kInitialDividerOffset, split.divider_offset()); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace views | 180 } // namespace views |
| OLD | NEW |