MacViews: Cater for the implied visibility change with -[NSWindow toggleFullScreen:]
commitb4be4bbf75f05080011ae1abb3258e81367ff627
authortapted <tapted@chromium.org>
Tue, 9 Dec 2014 02:18:45 +0000 (8 18:18 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 9 Dec 2014 02:19:05 +0000 (9 02:19 +0000)
tree488badf34281fc3adff8a61decd25e0712c7b5fa
parentd484d45513b5d1460c77fb1e9c1222d620b43abb
MacViews: Cater for the implied visibility change with -[NSWindow toggleFullScreen:]

Calling toggleFullScreen: implicitly makes the NSWindow visible. Failing
to cater for this causes tests to fail when layers are added.

AppKit updates window visibility quite late in the toggleFullScreen
flow. The best thing to do seems to be to just pre-empt the implied
visibility change and ensure the window is visible, before calling
toggleFullScreen:.

The fullscreen tests also get a lot flakier when layers enter the
picture. This is because tests are parallelised, and if two processes
simultaneously call toggleFullScreen:, then one of them fails. This CL
moves them to the macviews_interactive_ui_tests (which will soon be
absorbed into interactive_ui_tests).

BUG=424058
TBR=sky@chromium.org (gyp/gn)

Review URL: https://codereview.chromium.org/783043002

Cr-Commit-Position: refs/heads/master@{#307403}
ui/views/BUILD.gn
ui/views/cocoa/bridged_native_widget.mm
ui/views/cocoa/bridged_native_widget_interactive_uitest.mm [new file with mode: 0644]
ui/views/cocoa/bridged_native_widget_unittest.mm
ui/views/views.gyp