Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/omamobile-shell/test/owl-idle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ Item {

function test_5_paused_home_stops_frames_and_slows_the_tick() {
verify(scheduler.tickInterval <= Phone.CLOCK.tickMs + 5)
// tickDelay() returns the time to the next boundary, so in the last
// second of a hidden period the paused delay is legitimately shorter
// than a tick. Step over that boundary before pausing, or the check
// below asserts something untrue about one second in every
// hiddenTickMs (it failed in CI that way).
if (Phone.tickDelay(Date.now(), true) <= Phone.CLOCK.tickMs + 5)
wait(Phone.CLOCK.tickMs + 20)
scheduler.paused = true
tryVerify(function() { return !scheduler.framing }, 500, "covered or off: no frames")
verify(scheduler.tickInterval > Phone.CLOCK.tickMs + 5, "the tick slows while paused (" + scheduler.tickInterval + " ms)")
Expand Down