From 8e7e882b675cfb56965854aefb50083ffa27e216 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 16 Apr 2026 15:47:04 +0300 Subject: [PATCH] tests/color-management-protocol: add set_failed_image_description Extend test coverage. Signed-off-by: Pekka Paalanen --- tests/color-management-protocol-test.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/color-management-protocol-test.c b/tests/color-management-protocol-test.c index a99468e15..d6d8a4cc8 100644 --- a/tests/color-management-protocol-test.c +++ b/tests/color-management-protocol-test.c @@ -353,6 +353,32 @@ TEST(create_image_description_soft_fail) return RESULT_OK; } +TEST(set_failed_image_description) +{ + struct client *client; + struct color_manager_client *cm; + struct image_description *image_descr; + struct wp_color_management_surface_v1 *cm_surface; + + client = create_client_and_test_surface(100, 100, 100, 100); + cm = color_manager_get(client); + + cm_surface = wp_color_manager_v1_get_surface(cm->manager_proxy, client->surface->wl_surface); + + image_descr = image_description_create_soft_fail(cm); + wp_color_management_surface_v1_set_image_description(cm_surface, + image_descr->proxy, + WP_COLOR_MANAGER_V1_RENDER_INTENT_PERCEPTUAL); + expect_protocol_error(client, &wp_color_management_surface_v1_interface, + WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_IMAGE_DESCRIPTION); + + wp_color_management_surface_v1_destroy(cm_surface); + image_description_destroy(image_descr); + client_destroy(client); + + return RESULT_OK; +} + TEST(get_surface_twice_bad) { struct client *client;