Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: ui/views/widget/native_widget_mac_unittest.mm

Issue 2508153003: MacViews: Disable NativeWidgetMacTest.WindowModalSheet. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ui/views/widget/native_widget_mac.h" 5 #import "ui/views/widget/native_widget_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 EXPECT_FALSE(hide_waiter.method_called()); 1038 EXPECT_FALSE(hide_waiter.method_called());
1039 1039
1040 // Wait for the hide again. It will call close on its retained copy of the 1040 // Wait for the hide again. It will call close on its retained copy of the
1041 // child NSWindow, but that's fine since all the C++ objects are detached. 1041 // child NSWindow, but that's fine since all the C++ objects are detached.
1042 hide_waiter.WaitForMethod(); 1042 hide_waiter.WaitForMethod();
1043 EXPECT_TRUE(hide_waiter.method_called()); 1043 EXPECT_TRUE(hide_waiter.method_called());
1044 } 1044 }
1045 } 1045 }
1046 1046
1047 // Tests behavior of window-modal dialogs, displayed as sheets. 1047 // Tests behavior of window-modal dialogs, displayed as sheets.
1048 TEST_F(NativeWidgetMacTest, WindowModalSheet) { 1048 // Disabled: fails due to sharding adjustments. DCHECK fails during closure when
1049 // the parent window receives an asynchronous occlusion state change from the
1050 // window server, after the child has its parent window relationship removed.
1051 // TODO(tapted): Fix it. http://cbrug.com/666503.
1052 TEST_F(NativeWidgetMacTest, DISABLED_WindowModalSheet) {
1049 NSWindow* native_parent = 1053 NSWindow* native_parent =
1050 MakeNativeParentWithStyle(NSClosableWindowMask | NSTitledWindowMask); 1054 MakeNativeParentWithStyle(NSClosableWindowMask | NSTitledWindowMask);
1051 1055
1052 Widget* sheet_widget = views::DialogDelegate::CreateDialogWidget( 1056 Widget* sheet_widget = views::DialogDelegate::CreateDialogWidget(
1053 new ModalDialogDelegate(ui::MODAL_TYPE_WINDOW), nullptr, 1057 new ModalDialogDelegate(ui::MODAL_TYPE_WINDOW), nullptr,
1054 [native_parent contentView]); 1058 [native_parent contentView]);
1055 1059
1056 // Retain, to run checks after the Widget is torn down. 1060 // Retain, to run checks after the Widget is torn down.
1057 base::scoped_nsobject<NSWindow> sheet_window( 1061 base::scoped_nsobject<NSWindow> sheet_window(
1058 [sheet_widget->GetNativeWindow() retain]); 1062 [sheet_widget->GetNativeWindow() retain]);
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1831 1835
1832 - (void)dealloc { 1836 - (void)dealloc {
1833 if (deallocFlag_) { 1837 if (deallocFlag_) {
1834 DCHECK(!*deallocFlag_); 1838 DCHECK(!*deallocFlag_);
1835 *deallocFlag_ = true; 1839 *deallocFlag_ = true;
1836 } 1840 }
1837 [super dealloc]; 1841 [super dealloc];
1838 } 1842 }
1839 1843
1840 @end 1844 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698