| 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 "ui/views/controls/single_split_view.h" | 5 #include "ui/views/controls/single_split_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/events/event_utils.h" | 12 #include "ui/events/event_utils.h" |
| 10 #include "ui/views/controls/single_split_view_listener.h" | 13 #include "ui/views/controls/single_split_view_listener.h" |
| 11 | 14 |
| 12 namespace { | 15 namespace { |
| 13 | 16 |
| 14 static void VerifySplitViewLayout(const views::SingleSplitView& split) { | 17 static void VerifySplitViewLayout(const views::SingleSplitView& split) { |
| 15 ASSERT_EQ(2, split.child_count()); | 18 ASSERT_EQ(2, split.child_count()); |
| 16 | 19 |
| 17 const views::View* leading = split.child_at(0); | 20 const views::View* leading = split.child_at(0); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 split.divider_offset()); | 225 split.divider_offset()); |
| 223 | 226 |
| 224 // Expect intial offset after a system/user gesture cancels the drag. | 227 // Expect intial offset after a system/user gesture cancels the drag. |
| 225 // This shouldn't occur after mouse release, but it's sufficient for testing. | 228 // This shouldn't occur after mouse release, but it's sufficient for testing. |
| 226 split.OnMouseCaptureLost(); | 229 split.OnMouseCaptureLost(); |
| 227 EXPECT_EQ(kInitialDividerOffset, split.divider_offset()); | 230 EXPECT_EQ(kInitialDividerOffset, split.divider_offset()); |
| 228 EXPECT_EQ(5, listener.count()); | 231 EXPECT_EQ(5, listener.count()); |
| 229 } | 232 } |
| 230 | 233 |
| 231 } // namespace views | 234 } // namespace views |
| OLD | NEW |