Flutter Engine
Loading...
Searching...
No Matches
dpi_utils_unittests.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter 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 <windows.h>
6
7
#include "
flutter/shell/platform/windows/dpi_utils.h
"
8
#include "gtest/gtest.h"
9
10
namespace
flutter
{
11
namespace
testing {
12
13
TEST
(DpiUtilsTest, NonZero) {
14
ASSERT_GT(
GetDpiForHWND
(
nullptr
), 0);
15
ASSERT_GT(
GetDpiForMonitor
(
nullptr
), 0);
16
};
17
18
TEST
(DpiUtilsTest, NullHwndUsesPrimaryMonitor) {
19
const
POINT target_point = {0, 0};
20
HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTOPRIMARY);
21
ASSERT_EQ(
GetDpiForHWND
(
nullptr
),
GetDpiForMonitor
(monitor));
22
};
23
24
}
// namespace testing
25
}
// namespace flutter
dpi_utils.h
flutter::testing::TEST
TEST(NativeAssetsManagerTest, NoAvailableAssets)
Definition
native_assets_unittests.cc:68
flutter
Definition
asset_manager.cc:10
flutter::GetDpiForHWND
UINT GetDpiForHWND(HWND hwnd)
Definition
dpi_utils.cc:128
flutter::GetDpiForMonitor
UINT GetDpiForMonitor(HMONITOR monitor)
Definition
dpi_utils.cc:132
shell
platform
windows
dpi_utils_unittests.cc
Generated on Wed Nov 5 2025 21:33:18 for Flutter Engine by
1.9.8