| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa.h" |
| 6 | 6 |
| 7 #include "chrome/browser/media_gallery/media_galleries_dialog_controller_mock.h" | 7 #include "chrome/browser/media_gallery/media_galleries_dialog_controller_mock.h" |
| 8 #include "chrome/browser/ui/browser_tabstrip.h" | 8 #include "chrome/browser/ui/browser_tabstrip.h" |
| 9 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h" | 9 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_alert.h" |
| 10 #include "chrome/browser/ui/constrained_window_tab_helper.h" | 10 #include "chrome/browser/ui/constrained_window_tab_helper.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 WillRepeatedly(ReturnRef(permissions)); | 35 WillRepeatedly(ReturnRef(permissions)); |
| 36 | 36 |
| 37 scoped_ptr<MediaGalleriesDialogCocoa> dialog( | 37 scoped_ptr<MediaGalleriesDialogCocoa> dialog( |
| 38 static_cast<MediaGalleriesDialogCocoa*>( | 38 static_cast<MediaGalleriesDialogCocoa*>( |
| 39 MediaGalleriesDialog::Create(&controller))); | 39 MediaGalleriesDialog::Create(&controller))); |
| 40 scoped_nsobject<NSWindow> window([[dialog->alert_ window] retain]); | 40 scoped_nsobject<NSWindow> window([[dialog->alert_ window] retain]); |
| 41 EXPECT_TRUE([window isVisible]); | 41 EXPECT_TRUE([window isVisible]); |
| 42 | 42 |
| 43 ConstrainedWindowTabHelper* constrained_window_tab_helper = | 43 ConstrainedWindowTabHelper* constrained_window_tab_helper = |
| 44 ConstrainedWindowTabHelper::FromWebContents(web_contents); | 44 ConstrainedWindowTabHelper::FromWebContents(web_contents); |
| 45 constrained_window_tab_helper->CloseConstrainedWindows(); | 45 constrained_window_tab_helper->CloseAllDialogs(); |
| 46 EXPECT_FALSE([window isVisible]); | 46 EXPECT_FALSE([window isVisible]); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace chrome | 49 } // namespace chrome |
| OLD | NEW |