New issue
Advanced search Search tips

Issue 813026 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Oct 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug-Regression



Sign in to add a comment

StyledLabelTest.LineHeight fails with 125% DPI

Project Member Reported by tmonius...@opera.com, Feb 16 2018

Issue description

Chrome Version: 66.0.3343.3
OS: Win7

What steps will reproduce the problem?
(1) Set system DPI to 125%
(2) Run StyledLabelTest.LineHeight

What happens instead?

../../ui/views/controls/styled_label_unittest.cc(576): error: Expected equality of these values:
  18 * 2 + default_height
    Which is: 56
  styled()->GetHeightForWidth(100)
    Which is: 60
 

Comment 1 by wutao@chromium.org, Feb 16 2018

Cc: -wutao@chromium.org msw@chromium.org
Owner: wutao@chromium.org
Status: Available (was: Untriaged)
I will have more investigation.
Status: Assigned (was: Available)
Labels: Needs-Feedback
Hi tmoniuszko@, how do you set system DPI to 125% in the test? And how to test in Win7?
In order to change system DPI on Win7, go to Control Panel then click Display and choose Medium - 125% radio button.
msw@, we might need to write a test if we can set the system DPI in the test?


Thanks tmoniuszko@. Do you go to specific page and find the height is not correct or you run the test in Win7 with the DPI change? Do you still see the fails since we change the test recently:
https://cs.chromium.org/chromium/src/ui/views/controls/styled_label_unittest.cc?l=515&rcl=099409a9c4ba441b5a0f1cec82be1f4125ec189d


Perhaps the test could use one of the display::Display scale members:
https://cs.chromium.org/chromium/src/ui/display/display.h?rcl=c3cc89944d2c1fc024dbeb00ebf7794cf0b81867&l=155
I haven't experienced any issues on pages. Just the test was failing for me as I'm using 125% DPI on my machine.

StyledLabelTest.LineHeight passes on the current master branch for me (as well as all other StyledLabelTests). It seems the recent changes fixed the failure.
Status: WontFix (was: Assigned)
If this doesn't repro anymore, let's close it out for now.

Sign in to add a comment