Handle WebContentsViewMac being destroyed while a <select> menu is showing.
content::PopupMenuHelper currently has protections for the
RenderFrameHostImpl and the RenderWidgetHostViewMac being destroyed in
the nested message loop that is run while showing the native NSMenu.
However, PopupMenuHelper doesn't protect against the WebContentsViewMac
(its owner) being destroyed.
Since r470769, posted tasks may be executed while a menu is fading out.
So it's possible for WebContentsViewMac to be destroyed sooner. Handle
Adds an integration test. Previously, destroying a tab wouldn't close a
<select> menu open on it, now it does. So, without the fix, the test
gets stuck waiting for the menu to close, but dismissing the menu (e.g.
by clicking anywhere) would reproduce the crash in the linked bug.