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

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

Issue 342833002: [Password Generation] Update Aura UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Coments Created 6 years, 5 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/styled_label.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/styled_label_unittest.cc
diff --git a/ui/views/controls/styled_label_unittest.cc b/ui/views/controls/styled_label_unittest.cc
index d360aedb1b02d9fdd3b2b3143ffed75d388063a7..624c146bfde8ad6955c90ef2f9dce380ce1f421e 100644
--- a/ui/views/controls/styled_label_unittest.cc
+++ b/ui/views/controls/styled_label_unittest.cc
@@ -405,6 +405,16 @@ TEST_F(StyledLabelTest, SetBaseFontList) {
EXPECT_EQ(label.GetPreferredSize().width(), styled()->width());
}
+TEST_F(StyledLabelTest, LineHeight) {
+ const std::string text("one");
+ InitStyledLabel(text);
+ int default_height = styled()->GetHeightForWidth(100);
+ const std::string newline_text("one\ntwo\nthree");
+ InitStyledLabel(newline_text);
+ styled()->SetLineHeight(18);
+ EXPECT_EQ(18 * 2 + default_height, styled()->GetHeightForWidth(100));
+}
+
TEST_F(StyledLabelTest, HandleEmptyLayout) {
const std::string text("This is a test block of text.");
InitStyledLabel(text);
« no previous file with comments | « ui/views/controls/styled_label.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698