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

Side by Side Diff: chrome/browser/ui/cocoa/ssl_client_certificate_selector_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 #import "chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h" 5 #import "chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h"
6 6
7 #import <SecurityInterface/SFChooseIdentityPanel.h> 7 #import <SecurityInterface/SFChooseIdentityPanel.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #import "base/mac/mac_util.h" 10 #import "base/mac/mac_util.h"
11 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
11 #include "chrome/browser/ssl/ssl_client_certificate_selector_test.h" 12 #include "chrome/browser/ssl/ssl_client_certificate_selector_test.h"
12 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_commands.h" 14 #include "chrome/browser/ui/browser_commands.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 15 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" 16 #include "components/web_modal/web_contents_modal_dialog_manager.h"
16 #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
17 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
18 #include "content/public/browser/web_contents_view.h" 18 #include "content/public/browser/web_contents_view.h"
19 #include "content/public/test/test_utils.h" 19 #include "content/public/test/test_utils.h"
20 #include "ui/base/cocoa/window_size_constants.h" 20 #include "ui/base/cocoa/window_size_constants.h"
21 21
22 using web_modal::WebContentsModalDialogManager;
23
22 namespace { 24 namespace {
23 25
24 void OnCertificateSelected(net::X509Certificate** out_cert, 26 void OnCertificateSelected(net::X509Certificate** out_cert,
25 int* out_count, 27 int* out_count,
26 net::X509Certificate* cert) { 28 net::X509Certificate* cert) {
27 *out_cert = cert; 29 *out_cert = cert;
28 ++(*out_count); 30 ++(*out_count);
29 } 31 }
30 32
31 } // namespace 33 } // namespace
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 AddBlankTabAndShow(browser()); 90 AddBlankTabAndShow(browser());
89 EXPECT_EQ(0.0, [sheetWindow alphaValue]); 91 EXPECT_EQ(0.0, [sheetWindow alphaValue]);
90 EXPECT_TRUE(NSEqualRects(ui::kWindowSizeDeterminedLater, 92 EXPECT_TRUE(NSEqualRects(ui::kWindowSizeDeterminedLater,
91 [sheetWindow frame])); 93 [sheetWindow frame]));
92 94
93 // Switch back and verify that the sheet is shown. 95 // Switch back and verify that the sheet is shown.
94 chrome::SelectNumberedTab(browser(), 0); 96 chrome::SelectNumberedTab(browser(), 0);
95 EXPECT_EQ(1.0, [sheetWindow alphaValue]); 97 EXPECT_EQ(1.0, [sheetWindow alphaValue]);
96 EXPECT_TRUE(NSEqualRects(sheetFrame, [sheetWindow frame])); 98 EXPECT_TRUE(NSEqualRects(sheetFrame, [sheetWindow frame]));
97 } 99 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/native_app_window_cocoa.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698