Currently fullscreenWindow wraps sizemodechange event callback by a Promise, but after bug 1193394 the Promise is fulfilled soon after dispatching the event, so on Linux platform it's possible that media feature change won't be applied at that time (see bug 1430380 comment 16). https://hg.mozilla.org/mozilla-central/file/17ade9f88b6e/testing/marionette/driver.js#l3086
Thanks for filing this bug. Specifically what does “waiting for the next tick” entail?
To be precise, that means to make sure all queued micro tasks have finished. I think waiting a requestAnimationFrame is a good one if we just do something flushing styles (i.e. getComputedStyle() or querying offsetTop or something) after fullscreenWindow. (setTimeout also works for that). If we did something which does not involve flushing style (querying style attribute directly? Though I don't think there are such cases we need, and it might be broken in the first place), we need to wait for one more tick (requestAnimationFrame) to make sure styling process happens.
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Version: Version 3 → Trunk
Summary: fullscreenWindow might want to wait for the next tick after receiving sizemodechange event → WebDriver:Fullscreen might want to wait for the next tick after receiving sizemodechange event
You need to log in before you can comment on or make changes to this bug.