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

Unified Diff: content/browser/renderer_host/input/web_input_event_unittest.cc

Issue 992383002: Fix for the WebInputEventBuilderTest.TestMouseEventScale content_unittests failures on the DrMemory… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed boneheaded error Created 5 years, 9 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 | « no previous file | ui/gfx/display.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/web_input_event_unittest.cc
diff --git a/content/browser/renderer_host/input/web_input_event_unittest.cc b/content/browser/renderer_host/input/web_input_event_unittest.cc
index 51f9e19b92eda42512dd20d44fd7a21692bc74e5..f78143650191a9d259963d1410f99b775d875fe9 100644
--- a/content/browser/renderer_host/input/web_input_event_unittest.cc
+++ b/content/browser/renderer_host/input/web_input_event_unittest.cc
@@ -6,6 +6,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/events/event_constants.h"
+#include "ui/gfx/display.h"
#include "ui/gfx/switches.h"
#if defined(OS_WIN)
@@ -24,6 +25,8 @@ TEST(WebInputEventBuilderTest, TestMouseEventScale) {
if (base::win::GetVersion() < base::win::VERSION_WIN7)
return;
+ gfx::Display::ResetForceDeviceScaleFactorForTesting();
+
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, "2");
@@ -47,6 +50,7 @@ TEST(WebInputEventBuilderTest, TestMouseEventScale) {
EXPECT_EQ(100, mouse_move.globalY);
command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1");
+ gfx::Display::ResetForceDeviceScaleFactorForTesting();
}
#endif
« no previous file with comments | « no previous file | ui/gfx/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698