New issue
Advanced search Search tips

Issue 671098 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 677520
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: All , Mac
Pri: 3
Type: Bug


Participants' hotlists:
MacViews-Task-Queue


Sign in to add a comment

MacViews (browser): ExtensionUninstallDialogViewBrowserTest.TrackParentWindowDestructionAfterViewCreation hits Check failed: ![window_ attachedSheet]

Project Member Reported by tapted@chromium.org, Dec 5 2016

Issue description

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


 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9a6b54bf9e57746988176460c1bf636a26be7a10

commit 9a6b54bf9e57746988176460c1bf636a26be7a10
Author: tapted <tapted@chromium.org>
Date: Mon Dec 05 07:39:58 2016

Fix mac_views_browser compile after r435575 (extension_uninstall_dialog_view_browsertest.cc)

go/macviewsbuilder broke after r435575. It removed a flag that
extension_uninstall_dialog_view_browsertest.cc was using.

But extension_uninstall_dialog_view_browsertest.cc is only built on
mac_views_browser builds, which doesn't need flags in the first place
(it's a compile/build flag).

One of the tests does sadly fail (see  http://crbug.com/671098 ), but
that's because it depends on things that should be gone by the time
mac_views_browser is a thing.

BUG= 425229 ,  671098 

Review-Url: https://codereview.chromium.org/2547923005
Cr-Commit-Position: refs/heads/master@{#436240}

[modify] https://crrev.com/9a6b54bf9e57746988176460c1bf636a26be7a10/chrome/browser/ui/views/extensions/extension_uninstall_dialog_view_browsertest.cc

Labels: MacViews-Browser
Mergedinto: 677520
Status: Duplicate (was: Available)
MacViews triage: this is a duplicate of  issue 677520 .

Sign in to add a comment