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/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" |
(...skipping 21 matching lines...) Expand all Loading... |
32 // destruction. | 32 // destruction. |
33 explicit TestClientCertificateDelegate(bool* destroyed) | 33 explicit TestClientCertificateDelegate(bool* destroyed) |
34 : destroyed_(destroyed) {} | 34 : destroyed_(destroyed) {} |
35 | 35 |
36 ~TestClientCertificateDelegate() override { | 36 ~TestClientCertificateDelegate() override { |
37 if (destroyed_ != nullptr) | 37 if (destroyed_ != nullptr) |
38 *destroyed_ = true; | 38 *destroyed_ = true; |
39 } | 39 } |
40 | 40 |
41 // content::ClientCertificateDelegate. | 41 // content::ClientCertificateDelegate. |
42 void ContinueWithCertificate(net::X509Certificate* cert) override { | 42 void ContinueWithCertificate(net::X509Certificate* cert, |
| 43 net::SSLPrivateKey* private_key) override { |
43 // TODO(davidben): Add a test which explicitly tests selecting a | 44 // TODO(davidben): Add a test which explicitly tests selecting a |
44 // certificate, or selecting no certificate, since closing the dialog | 45 // certificate, or selecting no certificate, since closing the dialog |
45 // (normally by closing the tab) is not the same as explicitly selecting no | 46 // (normally by closing the tab) is not the same as explicitly selecting no |
46 // certificate. | 47 // certificate. |
47 ADD_FAILURE() << "Certificate selected"; | 48 ADD_FAILURE() << "Certificate selected"; |
48 } | 49 } |
49 | 50 |
50 private: | 51 private: |
51 bool* destroyed_; | 52 bool* destroyed_; |
52 | 53 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // Switch to another tab and verify that the sheet is hidden. | 112 // Switch to another tab and verify that the sheet is hidden. |
112 AddBlankTabAndShow(browser()); | 113 AddBlankTabAndShow(browser()); |
113 EXPECT_EQ(0.0, [sheetWindow alphaValue]); | 114 EXPECT_EQ(0.0, [sheetWindow alphaValue]); |
114 EXPECT_NSEQ(ui::kWindowSizeDeterminedLater, [sheetWindow frame]); | 115 EXPECT_NSEQ(ui::kWindowSizeDeterminedLater, [sheetWindow frame]); |
115 | 116 |
116 // Switch back and verify that the sheet is shown. | 117 // Switch back and verify that the sheet is shown. |
117 chrome::SelectNumberedTab(browser(), 0); | 118 chrome::SelectNumberedTab(browser(), 0); |
118 EXPECT_EQ(1.0, [sheetWindow alphaValue]); | 119 EXPECT_EQ(1.0, [sheetWindow alphaValue]); |
119 EXPECT_NSEQ(sheetFrame, [sheetWindow frame]); | 120 EXPECT_NSEQ(sheetFrame, [sheetWindow frame]); |
120 } | 121 } |
OLD | NEW |