mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Implement auto-suspend function for Kobo. Add test case for UIManager:_checkTasks, which should not clear _task_queue_dirty bit before looping.
This commit is contained in:
@@ -153,4 +153,12 @@ describe("UIManager spec", function()
|
||||
UIManager:_checkTasks()
|
||||
assert.are.same(run_count, 2)
|
||||
end)
|
||||
|
||||
it("should clear _task_queue_dirty bit before looping", function()
|
||||
UIManager:quit()
|
||||
assert.is.not_true(UIManager._task_queue_dirty)
|
||||
UIManager:nextTick(function() UIManager:nextTick(noop) end)
|
||||
UIManager:_checkTasks()
|
||||
assert.is_true(UIManager._task_queue_dirty)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user