OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" |
5 #include "ui/views/controls/scrollbar/native_scroll_bar.h" | 6 #include "ui/views/controls/scrollbar/native_scroll_bar.h" |
6 #include "ui/views/controls/scrollbar/native_scroll_bar_views.h" | 7 #include "ui/views/controls/scrollbar/native_scroll_bar_views.h" |
7 #include "ui/views/controls/scrollbar/scroll_bar.h" | 8 #include "ui/views/controls/scrollbar/scroll_bar.h" |
8 #include "ui/views/test/views_test_base.h" | 9 #include "ui/views/test/views_test_base.h" |
9 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 // The Scrollbar controller. This is the widget that should do the real | 14 // The Scrollbar controller. This is the widget that should do the real |
14 // scrolling of contents. | 15 // scrolling of contents. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 scrollbar_->Update(100, 101, 0); | 161 scrollbar_->Update(100, 101, 0); |
161 EXPECT_TRUE(scrollbar_->ScrollByContentsOffset(-1)); | 162 EXPECT_TRUE(scrollbar_->ScrollByContentsOffset(-1)); |
162 // Shrink and then re-exapnd the content. | 163 // Shrink and then re-exapnd the content. |
163 scrollbar_->Update(100, 100, 0); | 164 scrollbar_->Update(100, 100, 0); |
164 scrollbar_->Update(100, 101, 0); | 165 scrollbar_->Update(100, 101, 0); |
165 // Ensure the scrollbar allows scrolling to the end. | 166 // Ensure the scrollbar allows scrolling to the end. |
166 EXPECT_TRUE(scrollbar_->ScrollByContentsOffset(-1)); | 167 EXPECT_TRUE(scrollbar_->ScrollByContentsOffset(-1)); |
167 } | 168 } |
168 | 169 |
169 } // namespace views | 170 } // namespace views |
OLD | NEW |