Chromium Code Reviews
DescriptionMacViews: Fix failing label-related views_unittests after r377477
r377477 Set a more Maccy default font size for labels on Mac.
LabelTest.EmptyLabelSizing tests did not handle a label having a
FontList other than a default-constructed gfx::FontList(). Fix by
comparing against the actual FontList.
A selection of StyledLabelTests were failing because they compare a
StyledLabel containing a default-constructed gfx::FontList() with a
views::Label() containing the gfx::FontList corresponding to
ui::kLabelFontSizeDelta (from ui::ResourceBundle).
The StyledLabelTests could be fixed updating the tests to use
corresponding gfx::FontLists. However, StyledLabel should have the same
default FontList as views::Label anyway (i.e. not the
default-constructed gfx::FontList(), but one from ui::ResourceBundle).
So fix these by asking a Label for its FontList.
Fixes the following views_unittests on Mac:
LabelTest.EmptyLabelSizing
StyledLabelTest.BasicWrapping
StyledLabelTest.DontBreakLinks
StyledLabelTest.NoWrapping
StyledLabelTest.StyledRangeBold
StyledLabelTest.StyledRangeWithDisabledLineWrapping
StyledLabelTest.StyledRangeWithTooltip
StyledLabelTest.WrapLongWords
BUG=564879, 579380
Committed: https://crrev.com/cfb9dbdfb06b03538d859b953b3896c75ed19306
Cr-Commit-Position: refs/heads/master@{#379980}
Patch Set 1 #Patch Set 2 : Well, this also fixes it #Patch Set 3 : I like this better #
Total comments: 1
Messages
Total messages: 12 (7 generated)
|
||||||||||||||||||||||||||||