Not sure what you want to test on this item. Your `idleTimerObserver` is the same as the previous one in the same suite so you did not "executing onactive before any onidle" here.

The API do simply the following things and expose the idle timers already exists inside Gecko before we register:
* Call `onidle` after x second of inactivity without considering the time you register, and,
* Call `onactive` once any activity (e.g. the user touches the screen) happens (after `onidle` is called).

`onactive` is never called before `onidle`.

the `idleTimer.js` script, combining the above API and the classic `setTimeout()` and `Date.now()`, give the user of the script
* Call `idleCallback` after x second of inactivity, after you register the callbacks or after the real idle.
* Call `activeCallback` once any activity (e.g. the user touches the screen) happens (after `idleCallback` is called).

So to create valid tests, you can follow the same usage pattern as stated above. Register the timer and pretend the following scenario:

* The phone has already idled (the API will call `onidle` right away async when register)
* The phone is active when we register, but idled after a while
* For both scenarios, as the idle API / script reaches the wait-for-active state, an `onactive` call from API results callback executed and reaches back to wait-for-idle state.

I recommend wrapping each of these tests independently in a `test()` inside the `suite('setIdleTimeout')`, some people prefer to put another `suite()` represent each of the scenario and group the asserts of each step inside `test()`s. That's totally fine as long as each of the scenario are isolated (e.g. idleCallbackStub is not reused).