Chrome Version : 56.0.2914.3
OS Version: OS X 10.12.1
This test is only run for mac_views_browser right now.
It currently hits:
[57883:775:1205/170312.247673:FATAL:bridged_native_widget.mm(566)] Check failed: ![window_ attachedSheet].
0 libbase.dylib 0x000000012945387e _ZN4base5debug10StackTraceC2Ev + 30
1 libbase.dylib 0x00000001294538e5 _ZN4base5debug10StackTraceC1Ev + 21
2 libbase.dylib 0x00000001294eb350 _ZN7logging10LogMessageD2Ev + 80
3 libbase.dylib 0x00000001294e8e55 _ZN7logging10LogMessageD1Ev + 21
4 libviews.dylib 0x000000012fa6c9bb _ZN5views19BridgedNativeWidget18SetVisibilityStateENS0_21WindowVisibilityStateE + 347
5 libviews.dylib 0x000000012fbdcbfc _ZN5views15NativeWidgetMac4HideEv + 108
6 libviews.dylib 0x000000012fbeee5d _ZN5views6Widget4HideEv + 29
7 browser_tests 0x000000011a6b8100 _ZN11BrowserView8CanCloseEv + 256
8 libviews.dylib 0x000000012fc0bb80 _ZN5views13NonClientView8CanCloseEv + 32
9 libviews.dylib 0x000000012fbedf99 _ZN5views6Widget5CloseEv + 105
10 browser_tests 0x000000011a6aeb2e _ZN11BrowserView5CloseEv + 46
11 browser_tests 0x0000000111b27ed6 _ZN90ExtensionUninstallDialogViewBrowserTest_TrackParentWindowDestructionAfterViewCreation_Test19RunTestOnMainThreadEv + 614
The problem is that it calls Widget::Close() while the window has an open sheet, that calls BrowserView::CanClose() which calls Widget::Hide(), which calls -[NSWindow orderOut:]
Now when a window has an open sheet on Mac, the Close button is disabled, so this "shouldn't" be able to be hit. But the browser can be closed other ways, so it probably still needs a fix.
- Otherwise, the test can kinda be fixed with something like
#if defined(OS_MACOSX)
views::Widget::GetWidgetForNativeWindow(
browser()->window()->GetNativeWindow())->CloseNow();
#else
browser()->window()->Close();
#endif
- calling orderOut on NSWindows with attached sheets is bad (see Issue 667602).
- We may be getting rid of sheets entirely (see Issue 671095).
* i.e. these dialogs may become webmodal
- On MacViews (not mac_views_browser), the extension uninstall dialog is using NSAlert
* but the extension install dialog probably applies to this
Comment 1 by bugdroid1@chromium.org
, Dec 5 2016