From 94271e8c913bac1245ebc94a5654919ccb407b5a Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 27 Sep 2015 15:31:42 +0200 Subject: [PATCH] test-leaks.lua: Also test tooltips Signed-off-by: Uli Schlachter --- tests/test-leaks.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/test-leaks.lua b/tests/test-leaks.lua index 32797f3ef..4bae79c71 100644 --- a/tests/test-leaks.lua +++ b/tests/test-leaks.lua @@ -36,6 +36,20 @@ local function collectable(a, b, c, d, e, f, g, h, last) end end +-- Use the layoutbox for testing delayed tooltips +local function tooltip_delayed() + local l = awful.widget.layoutbox(1) + local t = l._layoutbox_tooltip + assert(t) + return l, t +end + +local function tooltip_now() + local w = wibox.widget.textbox("some textbox") + local t = awful.tooltip({ objects = {w} }) + return w, t +end + -- First test some basic widgets collectable(wibox.widget.base.make_widget()) collectable(wibox.widget.textbox("foo")) @@ -49,6 +63,12 @@ collectable(awful.widget.textclock()) collectable(awful.widget.layoutbox(1)) -- Some widgets do things via timer.delayed_call +prepare_for_collect = emit_refresh +collectable(tooltip_delayed()) + +prepare_for_collect = emit_refresh +collectable(tooltip_now()) + prepare_for_collect = emit_refresh collectable(awful.widget.taglist(1, awful.widget.taglist.filter.all))