Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
cb127e11
Commit
cb127e11
authored
Jun 29, 2020
by
Brendan Shanks
Committed by
Alexandre Julliard
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add more QueryDisplayConfig() tests.
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5fba152e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
2 deletions
+45
-2
monitor.c
dlls/user32/tests/monitor.c
+45
-2
No files found.
dlls/user32/tests/monitor.c
View file @
cb127e11
...
@@ -1288,7 +1288,8 @@ static void test_EnumDisplayMonitors(void)
...
@@ -1288,7 +1288,8 @@ static void test_EnumDisplayMonitors(void)
}
}
}
}
static
void
test_QueryDisplayConfig_result
(
UINT32
paths
,
const
DISPLAYCONFIG_PATH_INFO
*
pi
,
UINT32
modes
,
const
DISPLAYCONFIG_MODE_INFO
*
mi
)
static
void
test_QueryDisplayConfig_result
(
UINT32
flags
,
UINT32
paths
,
const
DISPLAYCONFIG_PATH_INFO
*
pi
,
UINT32
modes
,
const
DISPLAYCONFIG_MODE_INFO
*
mi
)
{
{
UINT32
i
;
UINT32
i
;
LONG
ret
;
LONG
ret
;
...
@@ -1385,6 +1386,24 @@ static void test_QueryDisplayConfig_result(UINT32 paths, const DISPLAYCONFIG_PAT
...
@@ -1385,6 +1386,24 @@ static void test_QueryDisplayConfig_result(UINT32 paths, const DISPLAYCONFIG_PAT
"Expected LUID %08x:%08x, got %08x:%08x
\n
"
,
"Expected LUID %08x:%08x, got %08x:%08x
\n
"
,
pi
[
i
].
targetInfo
.
adapterId
.
HighPart
,
pi
[
i
].
targetInfo
.
adapterId
.
LowPart
,
pi
[
i
].
targetInfo
.
adapterId
.
HighPart
,
pi
[
i
].
targetInfo
.
adapterId
.
LowPart
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
adapterId
.
HighPart
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
adapterId
.
LowPart
);
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
adapterId
.
HighPart
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
adapterId
.
LowPart
);
ok
(
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
activeSize
.
cx
>
0
&&
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
activeSize
.
cy
>
0
,
"Expected non-zero height/width, got %ux%u
\n
"
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
activeSize
.
cx
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
activeSize
.
cy
);
if
(
flags
==
QDC_DATABASE_CURRENT
)
ok
(
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cx
==
0
&&
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cy
==
0
,
"Expected zero height/width, got %ux%u
\n
"
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cx
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cy
);
else
ok
(
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cx
>
0
&&
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cy
>
0
,
"Expected non-zero height/width, got %ux%u
\n
"
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cx
,
mi
[
pi
[
i
].
targetInfo
.
modeInfoIdx
].
targetMode
.
targetVideoSignalInfo
.
totalSize
.
cy
);
}
}
}
}
...
@@ -1393,6 +1412,7 @@ static void test_QueryDisplayConfig(void)
...
@@ -1393,6 +1412,7 @@ static void test_QueryDisplayConfig(void)
UINT32
paths
,
modes
;
UINT32
paths
,
modes
;
DISPLAYCONFIG_PATH_INFO
pi
[
10
];
DISPLAYCONFIG_PATH_INFO
pi
[
10
];
DISPLAYCONFIG_MODE_INFO
mi
[
20
];
DISPLAYCONFIG_MODE_INFO
mi
[
20
];
DISPLAYCONFIG_TOPOLOGY_ID
topologyid
;
LONG
ret
;
LONG
ret
;
ret
=
pQueryDisplayConfig
(
QDC_ALL_PATHS
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
ret
=
pQueryDisplayConfig
(
QDC_ALL_PATHS
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
...
@@ -1435,6 +1455,18 @@ static void test_QueryDisplayConfig(void)
...
@@ -1435,6 +1455,18 @@ static void test_QueryDisplayConfig(void)
ret
=
pQueryDisplayConfig
(
0
,
&
paths
,
pi
,
&
modes
,
mi
,
NULL
);
ret
=
pQueryDisplayConfig
(
0
,
&
paths
,
pi
,
&
modes
,
mi
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
paths
=
modes
=
1
;
ret
=
pQueryDisplayConfig
(
0xFF
,
&
paths
,
pi
,
&
modes
,
mi
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
paths
=
modes
=
1
;
ret
=
pQueryDisplayConfig
(
QDC_DATABASE_CURRENT
,
&
paths
,
pi
,
&
modes
,
mi
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
paths
=
modes
=
1
;
ret
=
pQueryDisplayConfig
(
QDC_ALL_PATHS
,
&
paths
,
pi
,
&
modes
,
mi
,
&
topologyid
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
/* Below this point, test functionality that requires a WDDM driver on Windows */
/* Below this point, test functionality that requires a WDDM driver on Windows */
paths
=
modes
=
1
;
paths
=
modes
=
1
;
memset
(
pi
,
0xFF
,
sizeof
(
pi
[
0
]));
memset
(
pi
,
0xFF
,
sizeof
(
pi
[
0
]));
...
@@ -1458,7 +1490,18 @@ static void test_QueryDisplayConfig(void)
...
@@ -1458,7 +1490,18 @@ static void test_QueryDisplayConfig(void)
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
paths
>
0
&&
modes
>
0
,
"got %u, %u
\n
"
,
paths
,
modes
);
ok
(
paths
>
0
&&
modes
>
0
,
"got %u, %u
\n
"
,
paths
,
modes
);
if
(
!
ret
&&
paths
>
0
&&
modes
>
0
)
if
(
!
ret
&&
paths
>
0
&&
modes
>
0
)
test_QueryDisplayConfig_result
(
paths
,
pi
,
modes
,
mi
);
test_QueryDisplayConfig_result
(
QDC_ONLY_ACTIVE_PATHS
,
paths
,
pi
,
modes
,
mi
);
paths
=
ARRAY_SIZE
(
pi
);
modes
=
ARRAY_SIZE
(
mi
);
memset
(
pi
,
0xFF
,
sizeof
(
pi
));
memset
(
mi
,
0xFF
,
sizeof
(
mi
));
topologyid
=
0xFF
;
ret
=
pQueryDisplayConfig
(
QDC_DATABASE_CURRENT
,
&
paths
,
pi
,
&
modes
,
mi
,
&
topologyid
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
topologyid
!=
0xFF
,
"expected topologyid to be set, got %d
\n
"
,
topologyid
);
if
(
!
ret
&&
paths
>
0
&&
modes
>
0
)
test_QueryDisplayConfig_result
(
QDC_DATABASE_CURRENT
,
paths
,
pi
,
modes
,
mi
);
}
}
static
void
test_DisplayConfigGetDeviceInfo
(
void
)
static
void
test_DisplayConfigGetDeviceInfo
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment