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

Side by Side Diff: ui/views/controls/scrollbar/scrollbar_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar.h ('k') | ui/views/controls/slider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "build/build_config.h"
6 #include "ui/views/controls/scrollbar/native_scroll_bar.h" 6 #include "ui/views/controls/scrollbar/native_scroll_bar.h"
7 #include "ui/views/controls/scrollbar/native_scroll_bar_views.h" 7 #include "ui/views/controls/scrollbar/native_scroll_bar_views.h"
8 #include "ui/views/controls/scrollbar/scroll_bar.h" 8 #include "ui/views/controls/scrollbar/scroll_bar.h"
9 #include "ui/views/test/views_test_base.h" 9 #include "ui/views/test/views_test_base.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // This is the native scrollbar the Views one wraps around. 86 // This is the native scrollbar the Views one wraps around.
87 NativeScrollBar* native_scrollbar_; 87 NativeScrollBar* native_scrollbar_;
88 88
89 // This is the Views scrollbar. 89 // This is the Views scrollbar.
90 BaseScrollBar* scrollbar_; 90 BaseScrollBar* scrollbar_;
91 91
92 // Keep track of the size of the track. This is how we can tell when we 92 // Keep track of the size of the track. This is how we can tell when we
93 // scroll to the middle. 93 // scroll to the middle.
94 int track_size_; 94 int track_size_;
95 95
96 scoped_ptr<TestScrollBarController> controller_; 96 std::unique_ptr<TestScrollBarController> controller_;
97 }; 97 };
98 98
99 // TODO(dnicoara) Can't run the test on Windows since the scrollbar |Part| 99 // TODO(dnicoara) Can't run the test on Windows since the scrollbar |Part|
100 // isn't handled in NativeTheme. 100 // isn't handled in NativeTheme.
101 #if defined(OS_WIN) 101 #if defined(OS_WIN)
102 #define MAYBE_Scrolling DISABLED_Scrolling 102 #define MAYBE_Scrolling DISABLED_Scrolling
103 #define MAYBE_ScrollBarFitsToBottom DISABLED_ScrollBarFitsToBottom 103 #define MAYBE_ScrollBarFitsToBottom DISABLED_ScrollBarFitsToBottom
104 #else 104 #else
105 #define MAYBE_Scrolling Scrolling 105 #define MAYBE_Scrolling Scrolling
106 #define MAYBE_ScrollBarFitsToBottom ScrollBarFitsToBottom 106 #define MAYBE_ScrollBarFitsToBottom ScrollBarFitsToBottom
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 scrollbar_->GetThumbSizeForTest()); 193 scrollbar_->GetThumbSizeForTest());
194 // Emulate a click on the full size scroll bar. 194 // Emulate a click on the full size scroll bar.
195 scrollbar_->ScrollToThumbPosition(0, false); 195 scrollbar_->ScrollToThumbPosition(0, false);
196 EXPECT_EQ(0, scrollbar_->GetPosition()); 196 EXPECT_EQ(0, scrollbar_->GetPosition());
197 // Emulate a key down. 197 // Emulate a key down.
198 scrollbar_->ScrollByAmount(BaseScrollBar::SCROLL_NEXT_LINE); 198 scrollbar_->ScrollByAmount(BaseScrollBar::SCROLL_NEXT_LINE);
199 EXPECT_EQ(0, scrollbar_->GetPosition()); 199 EXPECT_EQ(0, scrollbar_->GetPosition());
200 } 200 }
201 201
202 } // namespace views 202 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/base_scroll_bar.h ('k') | ui/views/controls/slider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698