fix unit test of readerlink and readerpaging

and have more confidence with the unit testing framework.

Now `make testfront` won't retry on failure and testing files are
ordered in each run so that it's possible to reproduce testing failure.

And this patch also fix flush settings not working before suspend issue:
at some point the `FlushSettings` event is sent to `UIManager` instead
of `ReaderUI`, but `UIManager` only delegated events to active widgets
and `ReaderUI` is actually not an active widgets thus will miss the event.

This patch also add a verbose debug mode with "-v" as a switch to turn
on this mode. With verbose mode on, event handling will be logged.
This commit is contained in:
chrox
2016-08-12 14:05:18 +08:00
parent 2fa8ebb7c4
commit 9ab005a1d3
14 changed files with 84 additions and 39 deletions

View File

@@ -52,6 +52,8 @@ it works using data gathered from a document interface
]]--
local ReaderUI = InputContainer:new{
name = "ReaderUI",
key_events = {
Close = { { "Home" },
doc = "close document", event = "Close" },
@@ -74,6 +76,7 @@ local ReaderUI = InputContainer:new{
function ReaderUI:registerModule(name, ui_module, always_active)
if name then self[name] = ui_module end
ui_module.name = "reader" .. name
table.insert(always_active and self.active_widgets or self, ui_module)
end