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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/media_galleries_dialog_cocoa_browsertest.mm

Issue 14969012: components: Create web_modal component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-before-land Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_galleries/media_galleries_dialog_controller_mock. h" 7 #include "chrome/browser/media_galleries/media_galleries_dialog_controller_mock. h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.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/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
11 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
12 #include "chrome/test/base/in_process_browser_test.h" 11 #include "chrome/test/base/in_process_browser_test.h"
12 #include "components/web_modal/web_contents_modal_dialog_manager.h"
13 #include "content/public/test/test_utils.h" 13 #include "content/public/test/test_utils.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using ::testing::NiceMock; 16 using ::testing::NiceMock;
17 using ::testing::Return; 17 using ::testing::Return;
18 using ::testing::ReturnRef; 18 using ::testing::ReturnRef;
19 using web_modal::WebContentsModalDialogManager;
19 20
20 namespace chrome { 21 namespace chrome {
21 22
22 class MediaGalleriesDialogBrowserTest : public InProcessBrowserTest { 23 class MediaGalleriesDialogBrowserTest : public InProcessBrowserTest {
23 }; 24 };
24 25
25 // Verify that programatically closing the constrained window correctly closes 26 // Verify that programatically closing the constrained window correctly closes
26 // the sheet. 27 // the sheet.
27 IN_PROC_BROWSER_TEST_F(MediaGalleriesDialogBrowserTest, Close) { 28 IN_PROC_BROWSER_TEST_F(MediaGalleriesDialogBrowserTest, Close) {
28 NiceMock<MediaGalleriesDialogControllerMock> controller; 29 NiceMock<MediaGalleriesDialogControllerMock> controller;
(...skipping 19 matching lines...) Expand all
48 49
49 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 50 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
50 WebContentsModalDialogManager::FromWebContents(web_contents); 51 WebContentsModalDialogManager::FromWebContents(web_contents);
51 WebContentsModalDialogManager::TestApi test_api( 52 WebContentsModalDialogManager::TestApi test_api(
52 web_contents_modal_dialog_manager); 53 web_contents_modal_dialog_manager);
53 test_api.CloseAllDialogs(); 54 test_api.CloseAllDialogs();
54 EXPECT_FALSE([window isVisible]); 55 EXPECT_FALSE([window isVisible]);
55 } 56 }
56 57
57 } // namespace chrome 58 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698