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

Issue 992383002: Fix for the WebInputEventBuilderTest.TestMouseEventScale content_unittests failures on the DrMemory… (Closed)

Created:
5 years, 9 months ago by ananta
Modified:
5 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jdduke+watch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix for the WebInputEventBuilderTest.TestMouseEventScale content_unittests failures on the DrMemory Windows builder. The test attempts to force a device scale factor via the force-device-scale-factor command line switch. While this works well in isolation, the test would fail if another test before it forces the device scale factor to something else. Reason being the device scale factor code uses static variables to determine if the scale factor has been forced and caches the value. This is done as an optimization as there are lots of calls to the GetDPIScale and related functions. Fix is to get rid of the static variables used to track if we checked for a forced device scale factor and the forced scale factor value. These are now global variables which can be reset via a static function Display::ResetForceDeviceScaleFactor. The WebInputEventBuilderTest.TestMouseEventScale test calls the above function to reset the forced device scale factor state. BUG=411634 TBR=cpu Committed: https://crrev.com/449c2485458f40a9627a9f2517c6297bd180aa80 Cr-Commit-Position: refs/heads/master@{#320049}

Patch Set 1 #

Patch Set 2 : Fixed comment #

Total comments: 4

Patch Set 3 : Code review comments #

Total comments: 2

Patch Set 4 : Fixed boneheaded error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -6 lines) Patch
M content/browser/renderer_host/input/web_input_event_unittest.cc View 1 2 3 chunks +4 lines, -0 lines 0 comments Download
M ui/gfx/display.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/display.cc View 1 2 3 2 chunks +22 lines, -6 lines 0 comments Download

Messages

Total messages: 22 (7 generated)
ananta
5 years, 9 months ago (2015-03-10 22:09:11 UTC) #2
scottmg
https://codereview.chromium.org/992383002/diff/20001/ui/gfx/display.cc File ui/gfx/display.cc (right): https://codereview.chromium.org/992383002/diff/20001/ui/gfx/display.cc#newcode57 ui/gfx/display.cc:57: if (g_ForcedDeviceScaleFactor < 0) I think it would be ...
5 years, 9 months ago (2015-03-10 23:02:01 UTC) #3
ananta
https://codereview.chromium.org/992383002/diff/20001/ui/gfx/display.cc File ui/gfx/display.cc (right): https://codereview.chromium.org/992383002/diff/20001/ui/gfx/display.cc#newcode57 ui/gfx/display.cc:57: if (g_ForcedDeviceScaleFactor < 0) On 2015/03/10 23:02:01, scottmg wrote: ...
5 years, 9 months ago (2015-03-10 23:31:57 UTC) #4
scottmg
lgtm
5 years, 9 months ago (2015-03-10 23:39:44 UTC) #5
ananta
5 years, 9 months ago (2015-03-10 23:43:26 UTC) #7
ananta
+sky for ui owners.
5 years, 9 months ago (2015-03-10 23:43:49 UTC) #8
sky
https://codereview.chromium.org/992383002/diff/40001/ui/gfx/display.cc File ui/gfx/display.cc (left): https://codereview.chromium.org/992383002/diff/40001/ui/gfx/display.cc#oldcode47 ui/gfx/display.cc:47: static const float kForcedDeviceScaleFactor = UGH! Can we always ...
5 years, 9 months ago (2015-03-11 00:03:41 UTC) #9
ananta
https://codereview.chromium.org/992383002/diff/40001/ui/gfx/display.cc File ui/gfx/display.cc (left): https://codereview.chromium.org/992383002/diff/40001/ui/gfx/display.cc#oldcode47 ui/gfx/display.cc:47: static const float kForcedDeviceScaleFactor = On 2015/03/11 00:03:41, sky ...
5 years, 9 months ago (2015-03-11 00:06:52 UTC) #10
sky
*SIGH* No doubt you're right. LGTM
5 years, 9 months ago (2015-03-11 03:52:21 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/992383002/60001
5 years, 9 months ago (2015-03-11 04:19:02 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/48804)
5 years, 9 months ago (2015-03-11 04:37:17 UTC) #16
ananta
+cpu. Tbring
5 years, 9 months ago (2015-03-11 04:47:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/992383002/60001
5 years, 9 months ago (2015-03-11 04:48:43 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-11 05:02:21 UTC) #21
commit-bot: I haz the power
5 years, 9 months ago (2015-03-11 05:02:57 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/449c2485458f40a9627a9f2517c6297bd180aa80
Cr-Commit-Position: refs/heads/master@{#320049}

Powered by Google App Engine
This is Rietveld 408576698