Index: uspace/lib/display/test/display.c
===================================================================
--- uspace/lib/display/test/display.c	(revision b0a94854e61e0da77ab38167f0510ca1ae7cd70a)
+++ uspace/lib/display/test/display.c	(revision a8eed5fbd3a0a8c9b9d42cf67e4146914e1b1be4)
@@ -55,4 +55,6 @@
 static errno_t test_window_create(void *, display_wnd_params_t *, sysarg_t *);
 static errno_t test_window_destroy(void *, sysarg_t);
+static errno_t test_window_resize(void *, sysarg_t, gfx_coord2_t *,
+    gfx_rect_t *);
 static errno_t test_get_event(void *, sysarg_t *, display_wnd_ev_t *);
 
@@ -62,4 +64,5 @@
 	.window_create = test_window_create,
 	.window_destroy = test_window_destroy,
+	.window_resize = test_window_resize,
 	.get_event = test_get_event
 };
@@ -88,4 +91,11 @@
 	gfx_rect_t create_rect;
 	bool window_destroy_called;
+	sysarg_t destroy_wnd_id;
+
+	bool window_resize_called;
+	gfx_coord2_t resize_offs;
+	gfx_rect_t resize_nbound;
+	sysarg_t resize_wnd_id;
+
 	bool get_event_called;
 	bool set_color_called;
@@ -220,4 +230,5 @@
 	rc = display_window_destroy(wnd);
 	PCUT_ASSERT_TRUE(resp.window_destroy_called);
+	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.destroy_wnd_id);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -272,6 +283,132 @@
 	rc = display_window_destroy(wnd);
 	PCUT_ASSERT_TRUE(resp.window_destroy_called);
+	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.destroy_wnd_id);
 	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
 
+	display_close(disp);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** display_window_resize() with server returning error response works. */
+PCUT_TEST(window_resize_failure)
+{
+	errno_t rc;
+	service_id_t sid;
+	display_t *disp = NULL;
+	display_wnd_params_t params;
+	display_window_t *wnd;
+	gfx_coord2_t offs;
+	gfx_rect_t nrect;
+	test_response_t resp;
+
+	async_set_fallback_port_handler(test_display_conn, &resp);
+
+	// FIXME This causes this test to be non-reentrant!
+	rc = loc_server_register(test_display_server);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = loc_service_register(test_display_svc, &sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = display_open(test_display_svc, &disp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(disp);
+
+	resp.rc = EOK;
+	display_wnd_params_init(&params);
+	params.rect.p0.x = 0;
+	params.rect.p0.y = 0;
+	params.rect.p0.x = 100;
+	params.rect.p0.y = 100;
+
+	rc = display_window_create(disp, &params, &test_display_wnd_cb,
+	    (void *) &resp, &wnd);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(wnd);
+
+	resp.rc = EIO;
+	resp.window_resize_called = false;
+	offs.x = 11;
+	offs.y = 12;
+	nrect.p0.x = 13;
+	nrect.p0.y = 14;
+	nrect.p1.x = 15;
+	nrect.p1.y = 16;
+
+	rc = display_window_resize(wnd, &offs, &nrect);
+	PCUT_ASSERT_TRUE(resp.window_resize_called);
+	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
+	PCUT_ASSERT_INT_EQUALS(wnd->id, resp.resize_wnd_id);
+	PCUT_ASSERT_INT_EQUALS(offs.x, resp.resize_offs.x);
+	PCUT_ASSERT_INT_EQUALS(offs.y, resp.resize_offs.y);
+	PCUT_ASSERT_INT_EQUALS(nrect.p0.x, resp.resize_nbound.p0.x);
+	PCUT_ASSERT_INT_EQUALS(nrect.p0.y, resp.resize_nbound.p0.y);
+	PCUT_ASSERT_INT_EQUALS(nrect.p1.x, resp.resize_nbound.p1.x);
+	PCUT_ASSERT_INT_EQUALS(nrect.p1.y, resp.resize_nbound.p1.y);
+
+	display_window_destroy(wnd);
+	display_close(disp);
+	rc = loc_service_unregister(sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** display_window_resize() with server returning success response works. */
+PCUT_TEST(window_resize_success)
+{
+	errno_t rc;
+	service_id_t sid;
+	display_t *disp = NULL;
+	display_wnd_params_t params;
+	display_window_t *wnd;
+	gfx_coord2_t offs;
+	gfx_rect_t nrect;
+	test_response_t resp;
+
+	async_set_fallback_port_handler(test_display_conn, &resp);
+
+	// FIXME This causes this test to be non-reentrant!
+	rc = loc_server_register(test_display_server);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = loc_service_register(test_display_svc, &sid);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = display_open(test_display_svc, &disp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(disp);
+
+	resp.rc = EOK;
+	display_wnd_params_init(&params);
+	params.rect.p0.x = 0;
+	params.rect.p0.y = 0;
+	params.rect.p0.x = 100;
+	params.rect.p0.y = 100;
+
+	rc = display_window_create(disp, &params, &test_display_wnd_cb,
+	    (void *) &resp, &wnd);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(wnd);
+
+	resp.rc = EOK;
+	resp.window_resize_called = false;
+	offs.x = 11;
+	offs.y = 12;
+	nrect.p0.x = 13;
+	nrect.p0.y = 14;
+	nrect.p1.x = 15;
+	nrect.p1.y = 16;
+
+	rc = display_window_resize(wnd, &offs, &nrect);
+	PCUT_ASSERT_TRUE(resp.window_resize_called);
+	PCUT_ASSERT_ERRNO_VAL(resp.rc, rc);
+	PCUT_ASSERT_INT_EQUALS(offs.x, resp.resize_offs.x);
+	PCUT_ASSERT_INT_EQUALS(offs.y, resp.resize_offs.y);
+	PCUT_ASSERT_INT_EQUALS(nrect.p0.x, resp.resize_nbound.p0.x);
+	PCUT_ASSERT_INT_EQUALS(nrect.p0.y, resp.resize_nbound.p0.y);
+	PCUT_ASSERT_INT_EQUALS(nrect.p1.x, resp.resize_nbound.p1.x);
+	PCUT_ASSERT_INT_EQUALS(nrect.p1.y, resp.resize_nbound.p1.y);
+
+	display_window_destroy(wnd);
 	display_close(disp);
 	rc = loc_service_unregister(sid);
@@ -792,4 +929,17 @@
 
 	resp->window_destroy_called = true;
+	resp->destroy_wnd_id = wnd_id;
+	return resp->rc;
+}
+
+static errno_t test_window_resize(void *arg, sysarg_t wnd_id,
+    gfx_coord2_t *offs, gfx_rect_t *nrect)
+{
+	test_response_t *resp = (test_response_t *) arg;
+
+	resp->window_resize_called = true;
+	resp->resize_wnd_id = wnd_id;
+	resp->resize_offs = *offs;
+	resp->resize_nbound = *nrect;
 	return resp->rc;
 }
