From 068cf6f02c147bd646ffd0f319493fe3783b4dc5 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Mon, 22 Feb 2021 21:38:01 +0800 Subject: [PATCH] user32/tests: Fix a test failure on w7u_2qxl TestBot VM. Signed-off-by: Zhiyi Zhang Signed-off-by: Alexandre Julliard --- dlls/user32/tests/monitor.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 58b3f0d5e0c..6b233970ace 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -743,17 +743,18 @@ static void test_ChangeDisplaySettingsEx(void) { dm.dmPosition = position; dm.dmFields |= DM_POSITION; - res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_RESET, NULL); /* Reattach detached non-primary adapters, otherwise ChangeDisplaySettingsExA with only CDS_RESET fails */ if (mode == 0 && device) { - todo_wine ok(res == DISP_CHANGE_FAILED, "ChangeDisplaySettingsExA %s mode %d returned unexpected %d\n", - devices[device].name, mode, res); res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); ok(res == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsExA %s mode %d returned unexpected %d\n", devices[device].name, mode, res); res = ChangeDisplaySettingsExA(NULL, NULL, NULL, 0, NULL); } + else + { + res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_RESET, NULL); + } ok(res == DISP_CHANGE_SUCCESSFUL || broken(res == DISP_CHANGE_FAILED), /* TestBots using VGA driver can't change to some modes */