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

Side by Side Diff: ui/message_center/views/bounded_label_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/message_center/views/bounded_label.h ('k') | ui/message_center/views/message_bubble_base.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/message_center/views/bounded_label.h" 5 #include "ui/message_center/views/bounded_label.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 label_->SetLineLimit(lines_); 76 label_->SetLineLimit(lines_);
77 return *this; 77 return *this;
78 } 78 }
79 79
80 private: 80 private:
81 // The default font list, which will be used for tests. 81 // The default font list, which will be used for tests.
82 gfx::FontList font_list_; 82 gfx::FontList font_list_;
83 int digit_pixels_; 83 int digit_pixels_;
84 int space_pixels_; 84 int space_pixels_;
85 int ellipsis_pixels_; 85 int ellipsis_pixels_;
86 scoped_ptr<BoundedLabel> label_; 86 std::unique_ptr<BoundedLabel> label_;
87 int lines_; 87 int lines_;
88 }; 88 };
89 89
90 /* Test macro *****************************************************************/ 90 /* Test macro *****************************************************************/
91 91
92 #define TEST_WRAP(expected, text, width, lines) \ 92 #define TEST_WRAP(expected, text, width, lines) \
93 EXPECT_EQ(ToString(expected), \ 93 EXPECT_EQ(ToString(expected), \
94 Label(ToString(text), lines).GetWrappedText(ToPixels(width))) 94 Label(ToString(text), lines).GetWrappedText(ToPixels(width)))
95 95
96 #define TEST_LINES(expected, text, width, lines) \ 96 #define TEST_LINES(expected, text, width, lines) \
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 // TODO(dharcourt): Add test cases to verify that: 210 // TODO(dharcourt): Add test cases to verify that:
211 // - SetMaxLines() affects the return values of some methods but not others. 211 // - SetMaxLines() affects the return values of some methods but not others.
212 // - Bound changes affects GetPreferredLines(), GetTextSize(), and 212 // - Bound changes affects GetPreferredLines(), GetTextSize(), and
213 // GetWrappedText() return values. 213 // GetWrappedText() return values.
214 // - GetTextFlags are as expected. 214 // - GetTextFlags are as expected.
215 215
216 } // namespace test 216 } // namespace test
217 217
218 } // namespace message_center 218 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/bounded_label.h ('k') | ui/message_center/views/message_bubble_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698