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

Unified Diff: ui/views/widget/native_widget_mac_unittest.mm

Issue 2628373002: MacViews: Support MODAL_TYPE_WINDOW in dialog tests. (Closed)
Patch Set: rebase Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/native_widget_mac.mm ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_mac_unittest.mm
diff --git a/ui/views/widget/native_widget_mac_unittest.mm b/ui/views/widget/native_widget_mac_unittest.mm
index e85aa064caa572451334954497933e2f17f828f8..75ee5631a3087ac7cff2acddc90142e7f104968e 100644
--- a/ui/views/widget/native_widget_mac_unittest.mm
+++ b/ui/views/widget/native_widget_mac_unittest.mm
@@ -1105,10 +1105,19 @@ TEST_F(NativeWidgetMacTest, WindowModalSheet) {
*did_observe_ptr = true;
}];
+ Widget::Widgets children;
+ Widget::GetAllChildWidgets([native_parent contentView], &children);
+ EXPECT_TRUE(children.empty());
+
sheet_widget->Show(); // Should run the above block, then animate the sheet.
EXPECT_TRUE(did_observe);
[[NSNotificationCenter defaultCenter] removeObserver:observer];
+ // Ensure sheets are included as a child.
+ Widget::GetAllChildWidgets([native_parent contentView], &children);
+ ASSERT_EQ(1u, children.size());
+ EXPECT_EQ(sheet_widget, *children.begin());
+
// Modal, so the close button in the parent window should get disabled.
EXPECT_FALSE([parent_close_button isEnabled]);
« no previous file with comments | « ui/views/widget/native_widget_mac.mm ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698