From: Brendan Shanks bshanks@codeweavers.com
--- dlls/user32/tests/monitor.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index 206d9505705..db481029f32 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -1982,6 +1982,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags, DISPLAYCONFIG_TARGET_DEVICE_NAME target_name; DISPLAYCONFIG_TARGET_PREFERRED_MODE preferred_mode; DISPLAYCONFIG_ADAPTER_NAME adapter_name; + DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO color_info; const DISPLAYCONFIG_DESKTOP_IMAGE_INFO *di;
for (i = 0; i < paths; i++) @@ -2033,6 +2034,14 @@ static void test_QueryDisplayConfig_result(UINT32 flags, ok(!ret, "Expected 0, got %ld\n", ret); ok(adapter_name.adapterDevicePath[0] != '\0', "Expected adapter device path, got empty string\n");
+ color_info.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO; + color_info.header.size = sizeof(color_info); + color_info.header.adapterId = pi[i].targetInfo.adapterId; + color_info.header.id = pi[i].targetInfo.id; + ret = pDisplayConfigGetDeviceInfo(&color_info.header); + todo_wine ok(!ret || broken(ret == ERROR_INVALID_PARAMETER) /* before Win10 1709 */, + "Expected 0, got %ld\n", ret); + /* Check corresponding modes */ if (flags & QDC_VIRTUAL_MODE_AWARE) { @@ -2287,6 +2296,7 @@ static void test_DisplayConfigGetDeviceInfo(void) DISPLAYCONFIG_TARGET_DEVICE_NAME target_name; DISPLAYCONFIG_TARGET_PREFERRED_MODE preferred_mode; DISPLAYCONFIG_ADAPTER_NAME adapter_name; + DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO color_info;
ret = pDisplayConfigGetDeviceInfo(NULL); ok(ret == ERROR_GEN_FAILURE, "got %ld\n", ret); @@ -2366,6 +2376,18 @@ static void test_DisplayConfigGetDeviceInfo(void) adapter_name.header.adapterId.HighPart = 0xFFFF; ret = pDisplayConfigGetDeviceInfo(&adapter_name.header); ok(ret == ERROR_GEN_FAILURE || ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret); + + color_info.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO; + color_info.header.size = sizeof(color_info) - 1; + ret = pDisplayConfigGetDeviceInfo(&color_info.header); + ok(ret == ERROR_INVALID_PARAMETER, "got %ld\n", ret); + + color_info.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO; + color_info.header.size = sizeof(color_info); + color_info.header.adapterId.LowPart = 0xFFFF; + color_info.header.adapterId.HighPart = 0xFFFF; + ret = pDisplayConfigGetDeviceInfo(&color_info.header); + ok(ret == ERROR_GEN_FAILURE || ret == ERROR_INVALID_PARAMETER || ret == ERROR_NOT_SUPPORTED, "got %ld\n", ret); }
static void test_display_config(void)