| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_path.h" | 5 #include "base/file_path.h" |
| 6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
| 7 #include "chrome/browser/ui/views/ssl_client_certificate_selector.h" | 7 #include "chrome/browser/ui/views/ssl_client_certificate_selector.h" |
| 8 #include "chrome/test/base/in_process_browser_test.h" | 8 #include "chrome/test/base/in_process_browser_test.h" |
| 9 #include "chrome/test/base/ui_test_utils.h" | 9 #include "chrome/test/base/ui_test_utils.h" |
| 10 #include "content/browser/ssl/ssl_client_auth_handler_mock.h" | 10 #include "content/browser/ssl/ssl_client_auth_handler_mock.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 virtual void SetUpOnMainThread() { | 88 virtual void SetUpOnMainThread() { |
| 89 SSLClientCertificateSelectorTest::SetUpOnMainThread(); | 89 SSLClientCertificateSelectorTest::SetUpOnMainThread(); |
| 90 | 90 |
| 91 auth_handler_1_ = new StrictMock<SSLClientAuthHandlerMock>( | 91 auth_handler_1_ = new StrictMock<SSLClientAuthHandlerMock>( |
| 92 static_cast<net::URLRequest*>(NULL), cert_request_info_1_); | 92 static_cast<net::URLRequest*>(NULL), cert_request_info_1_); |
| 93 auth_handler_2_ = new StrictMock<SSLClientAuthHandlerMock>( | 93 auth_handler_2_ = new StrictMock<SSLClientAuthHandlerMock>( |
| 94 static_cast<net::URLRequest*>(NULL), cert_request_info_2_); | 94 static_cast<net::URLRequest*>(NULL), cert_request_info_2_); |
| 95 | 95 |
| 96 AddTabAtIndex(1, GURL("about:blank"), PageTransition::LINK); | 96 AddTabAtIndex(1, GURL("about:blank"), content::PAGE_TRANSITION_LINK); |
| 97 AddTabAtIndex(2, GURL("about:blank"), PageTransition::LINK); | 97 AddTabAtIndex(2, GURL("about:blank"), content::PAGE_TRANSITION_LINK); |
| 98 ASSERT_TRUE(NULL != browser()->GetTabContentsAt(0)); | 98 ASSERT_TRUE(NULL != browser()->GetTabContentsAt(0)); |
| 99 ASSERT_TRUE(NULL != browser()->GetTabContentsAt(1)); | 99 ASSERT_TRUE(NULL != browser()->GetTabContentsAt(1)); |
| 100 ASSERT_TRUE(NULL != browser()->GetTabContentsAt(2)); | 100 ASSERT_TRUE(NULL != browser()->GetTabContentsAt(2)); |
| 101 ui_test_utils::WaitForLoadStop(browser()->GetTabContentsAt(1)); | 101 ui_test_utils::WaitForLoadStop(browser()->GetTabContentsAt(1)); |
| 102 ui_test_utils::WaitForLoadStop(browser()->GetTabContentsAt(2)); | 102 ui_test_utils::WaitForLoadStop(browser()->GetTabContentsAt(2)); |
| 103 | 103 |
| 104 selector_1_ = new SSLClientCertificateSelector( | 104 selector_1_ = new SSLClientCertificateSelector( |
| 105 browser()->GetTabContentsWrapperAt(1), | 105 browser()->GetTabContentsWrapperAt(1), |
| 106 cert_request_info_1_, | 106 cert_request_info_1_, |
| 107 auth_handler_1_); | 107 auth_handler_1_); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 browser(), ui::VKEY_RETURN, false, false, false, false)); | 196 browser(), ui::VKEY_RETURN, false, false, false, false)); |
| 197 | 197 |
| 198 Mock::VerifyAndClear(auth_handler_); | 198 Mock::VerifyAndClear(auth_handler_); |
| 199 Mock::VerifyAndClear(auth_handler_1_); | 199 Mock::VerifyAndClear(auth_handler_1_); |
| 200 Mock::VerifyAndClear(auth_handler_2_); | 200 Mock::VerifyAndClear(auth_handler_2_); |
| 201 | 201 |
| 202 // Now let the default selection for auth_handler_ mock get checked on | 202 // Now let the default selection for auth_handler_ mock get checked on |
| 203 // destruction. | 203 // destruction. |
| 204 EXPECT_CALL(*auth_handler_, CertificateSelectedNoNotify(NULL)); | 204 EXPECT_CALL(*auth_handler_, CertificateSelectedNoNotify(NULL)); |
| 205 } | 205 } |
| OLD | NEW |