On Wed, Jan 20, 2021 at 09:25:32PM +0800, Zhiyi Zhang wrote:
On 1/20/21 7:23 PM, Huw Davies wrote:
On Wed, Jan 20, 2021 at 04:39:48PM +0800, Zhiyi Zhang wrote:
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
dlls/gdi32/tests/dc.c | 220 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+)
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index 04703288302..aa6917d432d 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -1672,6 +1672,225 @@ static void test_clip_box(void)
- /* Test GetDeviceCaps() values after mode changes */
- memset(&dm2, 0, sizeof(dm2));
- dm2.dmSize = sizeof(dm2);
- for (mode_idx = 0; EnumDisplaySettingsA(NULL, mode_idx, &dm2); ++mode_idx)
- {
if (dm2.dmPelsWidth != dm.dmPelsWidth && dm2.dmPelsHeight != dm.dmPelsHeight)
break;
- }
- ok(dm2.dmPelsWidth && dm2.dmPelsWidth != dm.dmPelsWidth && dm2.dmPelsHeight != dm.dmPelsHeight,
"Failed to find a different resolution.\n");
- res = ChangeDisplaySettingsExA(NULL, &dm2, NULL, CDS_RESET, NULL);
- ok(res == DISP_CHANGE_SUCCESSFUL || broken(res == DISP_CHANGE_FAILED), /* Win8 TestBots */
"ChangeDisplaySettingsExA returned unexpected %d.\n", res);
How important are the tests with a different mode? It would be nice not to have yet another mode change.
Basically to test that the values returned from GetDeviceCaps(HORZRES/VERTRES) are not static and can change with display mode changes after DC creation. I think it would be better to keep them as such bugs are often discovered between mode changes.
In that case these could be merged with the user32 monitor or sysparams tests (ideally as part of an existing mode change).
Huw.