OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/views/certificate_selector.h" | 5 #include "chrome/browser/ui/views/certificate_selector.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
14 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
15 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
16 #include "chrome/test/base/interactive_test_utils.h" | 16 #include "chrome/test/base/interactive_test_utils.h" |
17 #include "content/public/test/browser_test_utils.h" | 17 #include "content/public/test/browser_test_utils.h" |
18 #include "net/base/test_data_directory.h" | |
19 #include "net/cert/x509_certificate.h" | 18 #include "net/cert/x509_certificate.h" |
20 #include "net/test/cert_test_util.h" | 19 #include "net/test/cert_test_util.h" |
| 20 #include "net/test/test_data_directory.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "ui/base/models/table_model.h" | 22 #include "ui/base/models/table_model.h" |
23 #include "ui/views/controls/label.h" | 23 #include "ui/views/controls/label.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 class TestCertificateSelector : public chrome::CertificateSelector { | 27 class TestCertificateSelector : public chrome::CertificateSelector { |
28 public: | 28 public: |
29 TestCertificateSelector(const net::CertificateList& certificates, | 29 TestCertificateSelector(const net::CertificateList& certificates, |
30 content::WebContents* web_contents) | 30 content::WebContents* web_contents) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 selector_->OnDoubleClick(); | 149 selector_->OnDoubleClick(); |
150 | 150 |
151 // Wait for the dialog to be closed and destroyed. | 151 // Wait for the dialog to be closed and destroyed. |
152 loop.Run(); | 152 loop.Run(); |
153 | 153 |
154 // Closing the dialog through a double click must call only the Accept() | 154 // Closing the dialog through a double click must call only the Accept() |
155 // function and not Cancel(). | 155 // function and not Cancel(). |
156 EXPECT_TRUE(accepted); | 156 EXPECT_TRUE(accepted); |
157 EXPECT_FALSE(canceled); | 157 EXPECT_FALSE(canceled); |
158 } | 158 } |
OLD | NEW |