Chromium Code Reviews| 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 85d7ec30ce630febc6aa7e13dd5f076adefcb3c6..e9242d638ca6bb2edb9c12d7b5b7bdb2dd1c07a9 100644 |
| --- a/ui/views/widget/native_widget_mac_unittest.mm |
| +++ b/ui/views/widget/native_widget_mac_unittest.mm |
| @@ -365,9 +365,9 @@ bool GetTooltipText(const gfx::Point& p, |
| EXPECT_EQ(6, observer.gained_visible_count()); |
| EXPECT_EQ(5, observer.lost_visible_count()); |
| - // No change when closing. |
| + // Closing the widget also hides it. |
| widget->CloseNow(); |
| - EXPECT_EQ(5, observer.lost_visible_count()); |
| + EXPECT_EQ(6, observer.lost_visible_count()); |
| EXPECT_EQ(6, observer.gained_visible_count()); |
| } |
| @@ -1154,22 +1154,17 @@ explicit ParentCloseMonitor(Widget* parent) { |
| } |
| void OnWidgetDestroying(Widget* child) override { |
| - // Upon a parent-triggered close, the NSWindow relationship will still exist |
| - // (it's removed just after OnWidgetDestroying() returns). The parent should |
| - // still be open (children are always closed first), but not have a delegate |
| - // (since it is being torn down). |
| - EXPECT_TRUE([child->GetNativeWindow() parentWindow]); |
| - EXPECT_TRUE([parent_nswindow_ isVisible]); |
| + // Closing the parent should hide it first, which will destroy the parent- |
| + // child relationship. The parent should still be open (children are always |
| + // closed first), but not have a delegate (since it is being torn down). |
| + EXPECT_FALSE([child->GetNativeWindow() parentWindow]); |
| + EXPECT_FALSE([parent_nswindow_ isVisible]); |
| EXPECT_FALSE([parent_nswindow_ delegate]); |
| EXPECT_FALSE(child_closed_); |
| } |
|
tapted
2016/10/28 05:13:17
huh - there's not much difference between these no
|
| void OnWidgetDestroyed(Widget* child) override { |
| - EXPECT_FALSE([child->GetNativeWindow() parentWindow]); |
| - EXPECT_TRUE([parent_nswindow_ isVisible]); |
| - EXPECT_FALSE([parent_nswindow_ delegate]); |
| - |
| EXPECT_FALSE(child_closed_); |
| child->RemoveObserver(this); |
| child_closed_ = true; |