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

Unified Diff: ui/views/controls/label_unittest.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/menu_scroll_view_container.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label_unittest.cc
diff --git a/ui/views/controls/label_unittest.cc b/ui/views/controls/label_unittest.cc
index 640b9d6297c7d6193607e6861df9cf03fb669d44..137613832b2735666bdbdf2b65646a5258b608ae 100644
--- a/ui/views/controls/label_unittest.cc
+++ b/ui/views/controls/label_unittest.cc
@@ -169,10 +169,8 @@ TEST(LabelTest, SingleLineSizing) {
// Test everything with borders.
gfx::Insets border(10, 20, 30, 40);
- label.set_border(Border::CreateEmptyBorder(border.top(),
- border.left(),
- border.bottom(),
- border.right()));
+ label.SetBorder(Border::CreateEmptyBorder(
+ border.top(), border.left(), border.bottom(), border.right()));
// GetPreferredSize and borders.
label.SetBounds(0, 0, 0, 0);
@@ -250,10 +248,8 @@ TEST(LabelTest, MultiLineSizing) {
// Test everything with borders.
gfx::Insets border(10, 20, 30, 40);
- label.set_border(Border::CreateEmptyBorder(border.top(),
- border.left(),
- border.bottom(),
- border.right()));
+ label.SetBorder(Border::CreateEmptyBorder(
+ border.top(), border.left(), border.bottom(), border.right()));
// SizeToFit and borders.
label.SizeToFit(0);
@@ -391,10 +387,8 @@ TEST(LabelTest, DrawSingleLineString) {
// Test single line drawing with a border.
gfx::Insets border(39, 34, 8, 96);
- label.set_border(Border::CreateEmptyBorder(border.top(),
- border.left(),
- border.bottom(),
- border.right()));
+ label.SetBorder(Border::CreateEmptyBorder(
+ border.top(), border.left(), border.bottom(), border.right()));
gfx::Size required_size_with_border(label.GetPreferredSize());
EXPECT_EQ(required_size.width() + border.width(),
@@ -534,10 +528,8 @@ TEST(LabelTest, DrawMultiLineString) {
// Test multiline drawing with a border.
gfx::Insets border(19, 92, 23, 2);
- label.set_border(Border::CreateEmptyBorder(border.top(),
- border.left(),
- border.bottom(),
- border.right()));
+ label.SetBorder(Border::CreateEmptyBorder(
+ border.top(), border.left(), border.bottom(), border.right()));
label.SizeToFit(0);
label.SetBounds(label.x(),
label.y(),
@@ -668,10 +660,8 @@ TEST(LabelTest, DrawSingleLineStringInRTL) {
// Test single line drawing with a border.
gfx::Insets border(39, 34, 8, 96);
- label.set_border(Border::CreateEmptyBorder(border.top(),
- border.left(),
- border.bottom(),
- border.right()));
+ label.SetBorder(Border::CreateEmptyBorder(
+ border.top(), border.left(), border.bottom(), border.right()));
gfx::Size required_size_with_border(label.GetPreferredSize());
EXPECT_EQ(required_size.width() + border.width(),
@@ -817,10 +807,8 @@ TEST(LabelTest, DrawMultiLineStringInRTL) {
// Test multiline drawing with a border.
gfx::Insets border(19, 92, 23, 2);
- label.set_border(Border::CreateEmptyBorder(border.top(),
- border.left(),
- border.bottom(),
- border.right()));
+ label.SetBorder(Border::CreateEmptyBorder(
+ border.top(), border.left(), border.bottom(), border.right()));
label.SizeToFit(0);
label.SetBounds(label.x(),
label.y(),
« no previous file with comments | « ui/views/controls/combobox/combobox.cc ('k') | ui/views/controls/menu/menu_scroll_view_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698