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

Issue 1773063002: MacViews: Fix failing label-related views_unittests after r377477 (Closed)

Created:
4 years, 9 months ago by tapted
Modified:
4 years, 9 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M ui/views/controls/label_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/styled_label.cc View 1 2 1 chunk +2 lines, -1 line 1 comment Download

Messages

Total messages: 12 (7 generated)
tapted
Hi sky, please take a look https://codereview.chromium.org/1773063002/diff/40001/ui/views/controls/styled_label.cc File ui/views/controls/styled_label.cc (right): https://codereview.chromium.org/1773063002/diff/40001/ui/views/controls/styled_label.cc#newcode102 ui/views/controls/styled_label.cc:102: : font_list_(Label().font_list()), There's ...
4 years, 9 months ago (2016-03-08 12:25:43 UTC) #5
sky
LGTM
4 years, 9 months ago (2016-03-08 17:13:07 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1773063002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1773063002/40001
4 years, 9 months ago (2016-03-08 23:23:28 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 9 months ago (2016-03-08 23:55:59 UTC) #10
commit-bot: I haz the power
4 years, 9 months ago (2016-03-08 23:57:46 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/cfb9dbdfb06b03538d859b953b3896c75ed19306
Cr-Commit-Position: refs/heads/master@{#379980}

Powered by Google App Engine
This is Rietveld 408576698