Ensure window visibility changes get propagated through automation

Whenever a window changes visibility, the node data changes. In particular, the invisible state gets set depending on the window->IsVisible() call.

This change fires a layout complete on the window who's visibility changes. Since the WindowObserver::OnWindowVisibilityChanged gets called on all ancestors and dscendants of the window, we can simply fire the event on the window being observed (and not the window passed to the callback).

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I97554c7224f7e5c125eb60609ea316e227ca2560
Reviewed-on: https://chromium-review.googlesource.com/942603
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540892}
7 files changed