Flutter Engine
The Flutter Engine
third_party
accessibility
base
win
display_unittest.cc
Go to the documentation of this file.
1
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "
base/win/display.h
"
6
7
#include "gtest/gtest.h"
8
9
namespace
base
{
10
namespace
win {
11
12
TEST
(Display,
ScaleFactorToFloat
) {
13
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_100_PERCENT), 1.00f);
14
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_120_PERCENT), 1.20f);
15
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_125_PERCENT), 1.25f);
16
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_140_PERCENT), 1.40f);
17
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_150_PERCENT), 1.50f);
18
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_160_PERCENT), 1.60f);
19
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_175_PERCENT), 1.75f);
20
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_180_PERCENT), 1.80f);
21
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_200_PERCENT), 2.00f);
22
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_225_PERCENT), 2.25f);
23
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_250_PERCENT), 2.50f);
24
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_350_PERCENT), 3.50f);
25
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_400_PERCENT), 4.00f);
26
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_450_PERCENT), 4.50f);
27
EXPECT_EQ(
ScaleFactorToFloat
(SCALE_500_PERCENT), 5.00f);
28
EXPECT_EQ(
ScaleFactorToFloat
(DEVICE_SCALE_FACTOR_INVALID), 1.0f);
29
}
30
31
}
// namespace win
32
}
// namespace base
base::win::TEST
TEST(Display, ScaleFactorToFloat)
Definition:
display_unittest.cc:12
base::win::ScaleFactorToFloat
float ScaleFactorToFloat(DEVICE_SCALE_FACTOR scale_factor)
Definition:
display.cc:83
base
Definition:
ax_tree_id_registry.h:17
display.h
Generated on Sun Jun 23 2024 21:55:21 for Flutter Engine by
1.9.4