Broken test WebDialogBrowserTest.CloseParentWindow on mac_views_browser builds
Reported by
atimo...@yandex-team.ru,
Dec 29 2016
|
|||||||||
Issue descriptionChrome Version : 57.0.2965.0 (64-bit) (local canary build with mac_views_browser=true) OS version : 10.12.2 What steps will reproduce the problem? (1) Build canary with mac_views_browser=true (2) Run browser_tests with "--gtest_filter=WebDialogBrowserTest.CloseParentWindow" What is the expected result? Test passed. What happens instead? Test failed on DCHECK in bridged_native_widget.mm added in crrev.com/2521753003.
,
Dec 29 2016
,
Jan 2 2017
So BrowserView::CanClose() calls Widget::Hide() to make the window appear to close quicker [1]. On Mac, if you hide a Widget while it has an attached sheet, the sheet becomes detached/broken, and the widget can not be re-shown. Possible fixes a) stop using sheets for window-modal dialogs b) stop using window-modal dialogs c) don't Hide() on Mac in BrowserView::CanClose() d) automatically dismiss all sheets when calling Widget::Hide() Before Chrome uses mac_views_browser by default, it's likely we will pursue (b) and this problem will go away. Until then, the failing test is the right way to indicate this problem. [1] https://chromium.googlesource.com/chromium/src/+/8e885367b432753eb4cc76e39faa3f32cbb529e4/chrome/browser/ui/views/frame/browser_view.cc#1841 For reference, the crashing stack is: [11705:775:0103/091808.326933:FATAL:bridged_native_widget.mm(566)] Check failed: ![window_ attachedSheet]. Process 11705 stopped * thread #1: tid = 0xfa30, 0x000000011a5a8404 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0) frame #0: 0x000000011a5a8404 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262 259 // Terminate the program after signaling the debug break. 260 _exit(1); 261 #endif -> 262 } 263 264 } // namespace debug 265 } // namespace base Process 11705 launched: '/Users/tapted/bdd/git/chromium/src/out/gn_Debug/browser_tests' (x86_64) (lldb) bt * thread #1: tid = 0xfa30, 0x000000011a5a8404 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262, name = 'CrBrowserMain', queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0) * frame #0: 0x000000011a5a8404 libbase.dylib`base::debug::BreakDebugger() + 20 at debugger_posix.cc:262 frame #1: 0x000000011a643443 libbase.dylib`logging::LogMessage::~LogMessage(this=0x00007fff5fbf9030) + 4387 at logging.cc:759 frame #2: 0x000000011a63fe75 libbase.dylib`logging::LogMessage::~LogMessage(this=0x00007fff5fbf9030) + 21 at logging.cc:533 frame #3: 0x0000000120d4000b libviews.dylib`views::BridgedNativeWidget::SetVisibilityState(this=0x000000014b74d0f0, new_state=HIDE_WINDOW) + 347 at bridged_native_widget.mm:566 frame #4: 0x0000000120eb0a2c libviews.dylib`views::NativeWidgetMac::Hide(this=0x000000014b74d0a0) + 108 at native_widget_mac.mm:407 frame #5: 0x0000000120ec2cad libviews.dylib`views::Widget::Hide(this=0x000000014b74cf20) + 29 at widget.cc:627 frame #6: 0x000000010b4bca10 browser_tests`BrowserView::CanClose(this=0x000000014b74ca50) + 256 at browser_view.cc:1845 frame #7: 0x0000000120edf9c0 libviews.dylib`views::NonClientView::CanClose(this=0x0000000142024e80) + 32 at non_client_view.cc:81 frame #8: 0x0000000120ec1de9 libviews.dylib`views::Widget::Close(this=0x000000014b74cf20) + 105 at widget.cc:569 frame #9: 0x000000010b4b343e browser_tests`BrowserView::Close(this=0x000000014b74ca50) + 46 at browser_view.cc:655 frame #10: 0x00000001027f904f browser_tests`WebDialogBrowserTest_CloseParentWindow_Test::RunTestOnMainThread(this=0x000000014b09da90) + 1423 at web_dialog_view_browsertest.cc:236 frame #3: 0x0000000120d4000b libviews.dylib`views::BridgedNativeWidget::SetVisibilityState(this=0x000000014b74d0f0, new_state=HIDE_WINDOW) + 347 at bridged_native_widget.mm:566 563 // See http://crbug.com/667602. Alternatives: call -setAlphaValue:0 and 564 // -setIgnoresMouseEvents:YES on the NSWindow, or dismiss the sheet before 565 // hiding. -> 566 DCHECK(![window_ attachedSheet]); 567 568 [window_ orderOut:nil]; 569 DCHECK(!window_visible_);
,
Apr 12 2017
,
Feb 25 2018
,
Mar 26 2018
MacViews triage: spqchan@, can you look into this for M68? Some bad things could be happening in our sheet-using code :)
,
Mar 26 2018
Issue 671098 has been merged into this issue.
,
Mar 27 2018
,
Mar 27 2018
,
Mar 29 2018
Test is passing |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by karandeepb@chromium.org
, Dec 29 2016