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

Unified Diff: ui/base/l10n/l10n_util_win_unittest.cc

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 years, 11 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 | « ui/base/l10n/l10n_util_win.cc ('k') | ui/base/l10n/time_format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_win_unittest.cc
diff --git a/ui/base/l10n/l10n_util_win_unittest.cc b/ui/base/l10n/l10n_util_win_unittest.cc
deleted file mode 100644
index c4ae8885b7ed194d17478c56364bc493ab4bb151..0000000000000000000000000000000000000000
--- a/ui/base/l10n/l10n_util_win_unittest.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/base/l10n/l10n_util_win.h"
-
-#include <windows.h>
-
-#include "base/win/win_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/platform_test.h"
-#include "ui/gfx/win/dpi.h"
-
-typedef PlatformTest L10nUtilWinTest;
-
-TEST_F(L10nUtilWinTest, TestDPIScaling) {
- // Baseline font for comparison.
- NONCLIENTMETRICS metrics;
- base::win::GetNonClientMetrics(&metrics);
- LOGFONT lf = metrics.lfMessageFont;
- l10n_util::AdjustUIFont(&lf);
- int size = lf.lfHeight;
- float rounding = size < 0 ? -0.5f : 0.5f;
-
- // Test that font size is properly normalized for DIP. In high-DPI mode, the
- // font metrics are scaled based on the DPI scale factor. For Windows 8, 140%
- // and 180% font scaling are supported. Simulate size normalization for a DPI-
- // aware process by manually scaling up the font and checking that it returns
- // to the expected size.
- lf.lfHeight = static_cast<int>(1.4 * size + rounding);
- l10n_util::AdjustUIFontForDIP(1.4f, &lf);
- EXPECT_NEAR(size, lf.lfHeight, 1);
-
- lf.lfHeight = static_cast<int>(1.8 * size + rounding);
- l10n_util::AdjustUIFontForDIP(1.8f, &lf);
- EXPECT_NEAR(size, lf.lfHeight, 1);
-}
« no previous file with comments | « ui/base/l10n/l10n_util_win.cc ('k') | ui/base/l10n/time_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698