Commit af0ae9df authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

user32/tests: Fix a test failure.

parent ef88a70f
...@@ -702,16 +702,18 @@ static void test_ChangeDisplaySettingsEx(void) ...@@ -702,16 +702,18 @@ static void test_ChangeDisplaySettingsEx(void)
dm2.dmSize = sizeof(dm2); dm2.dmSize = sizeof(dm2);
for (mode = 0; EnumDisplaySettingsA(devices[device].name, mode, &dm2); ++mode) for (mode = 0; EnumDisplaySettingsA(devices[device].name, mode, &dm2); ++mode)
{ {
if (dm2.dmPelsWidth != dm.dmPelsWidth && dm2.dmPelsHeight != dm.dmPelsHeight) /* Use the same color depth because the win2008 TestBots are unable to change it */
if (dm2.dmPelsWidth != dm.dmPelsWidth && dm2.dmPelsHeight != dm.dmPelsHeight &&
dm2.dmBitsPerPel == dm.dmBitsPerPel)
break; break;
} }
ok(dm2.dmPelsWidth != dm.dmPelsWidth && dm2.dmPelsHeight != dm.dmPelsHeight, "Failed to find a different mode.\n"); ok(dm2.dmPelsWidth != dm.dmPelsWidth && dm2.dmPelsHeight != dm.dmPelsHeight &&
dm2.dmBitsPerPel == dm.dmBitsPerPel, "Failed to find a different mode.\n");
/* Test normal operation */ /* Test normal operation */
dm = dm2;
dm.dmFields |= DM_POSITION;
dm.dmPosition = position; dm.dmPosition = position;
dm.dmPelsWidth = dm2.dmPelsWidth;
dm.dmPelsHeight = dm2.dmPelsHeight;
dm.dmDisplayFrequency = dm2.dmDisplayFrequency;
res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL); res = ChangeDisplaySettingsExA(devices[device].name, &dm, NULL, CDS_UPDATEREGISTRY | CDS_NORESET, NULL);
ok(res == DISP_CHANGE_SUCCESSFUL || ok(res == DISP_CHANGE_SUCCESSFUL ||
broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */ broken(res == DISP_CHANGE_FAILED), /* win8 TestBot */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment