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 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" | 5 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
9 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | |
10 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
11 #include "content/public/test/test_utils.h" | 11 #include "content/public/test/test_utils.h" |
12 | 12 |
| 13 using web_modal::WebContentsModalDialogManager; |
| 14 |
13 typedef InProcessBrowserTest CollectedCookiesMacTest; | 15 typedef InProcessBrowserTest CollectedCookiesMacTest; |
14 | 16 |
15 IN_PROC_BROWSER_TEST_F(CollectedCookiesMacTest, Close) { | 17 IN_PROC_BROWSER_TEST_F(CollectedCookiesMacTest, Close) { |
16 content::WebContents* web_contents = | 18 content::WebContents* web_contents = |
17 browser()->tab_strip_model()->GetActiveWebContents(); | 19 browser()->tab_strip_model()->GetActiveWebContents(); |
18 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 20 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
19 WebContentsModalDialogManager::FromWebContents(web_contents); | 21 WebContentsModalDialogManager::FromWebContents(web_contents); |
20 EXPECT_FALSE(web_contents_modal_dialog_manager->IsShowingDialog()); | 22 EXPECT_FALSE(web_contents_modal_dialog_manager->IsShowingDialog()); |
21 | 23 |
22 // Deletes itself. | 24 // Deletes itself. |
(...skipping 21 matching lines...) Expand all Loading... |
44 EXPECT_TRUE([sheet_controller infoBarIcon]); | 46 EXPECT_TRUE([sheet_controller infoBarIcon]); |
45 EXPECT_TRUE([sheet_controller infoBarText]); | 47 EXPECT_TRUE([sheet_controller infoBarText]); |
46 EXPECT_TRUE([sheet_controller tabView]); | 48 EXPECT_TRUE([sheet_controller tabView]); |
47 EXPECT_TRUE([sheet_controller blockedScrollView]); | 49 EXPECT_TRUE([sheet_controller blockedScrollView]); |
48 EXPECT_TRUE([sheet_controller blockedCookiesText]); | 50 EXPECT_TRUE([sheet_controller blockedCookiesText]); |
49 EXPECT_TRUE([sheet_controller cookieDetailsViewPlaceholder]); | 51 EXPECT_TRUE([sheet_controller cookieDetailsViewPlaceholder]); |
50 | 52 |
51 [sheet_controller closeSheet:nil]; | 53 [sheet_controller closeSheet:nil]; |
52 content::RunAllPendingInMessageLoop(); | 54 content::RunAllPendingInMessageLoop(); |
53 } | 55 } |
OLD | NEW |