From aed2af44b6ee81b5e5a930ed6667e515b53ca8bc Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 17 Jul 2019 03:26:17 -0400 Subject: [PATCH] tests: Check if using client icon doesn't exceed the size constraints. --- tests/test-naughty-legacy.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test-naughty-legacy.lua b/tests/test-naughty-legacy.lua index 640529f00..f433c342a 100644 --- a/tests/test-naughty-legacy.lua +++ b/tests/test-naughty-legacy.lua @@ -556,6 +556,16 @@ table.insert(steps, function() assert(n2.box.width +2*n2.box.border_width <= wa.width ) assert(n2.box.height+2*n2.box.border_width <= wa.height) + -- Check with client icons. + assert(not n1.icon) + + n1._private.clients = {{icon= big_icon, type = "normal"}} + assert(n1.icon == big_icon) + assert(n1.box.width +2*n1.box.border_width <= wa.width ) + assert(n1.box.height+2*n1.box.border_width <= wa.height) + assert(n2.box.width +2*n2.box.border_width <= wa.width ) + assert(n2.box.height+2*n2.box.border_width <= wa.height) + n1:destroy() n2:destroy()