| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ssl/chrome_ssl_host_state_delegate.h" | 5 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/test/simple_test_clock.h" | 12 #include "base/test/simple_test_clock.h" |
| 13 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 13 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 14 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 14 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 15 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" | 15 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" |
| 16 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" | 16 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" |
| 17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" | 19 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" |
| 20 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
| 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 23 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
| 24 #include "components/browsing_data/browsing_data_utils.h" | 24 #include "components/browsing_data/core/browsing_data_utils.h" |
| 25 #include "components/content_settings/core/browser/host_content_settings_map.h" | 25 #include "components/content_settings/core/browser/host_content_settings_map.h" |
| 26 #include "components/content_settings/core/common/content_settings_pattern.h" | 26 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 27 #include "content/public/browser/ssl_host_state_delegate.h" | 27 #include "content/public/browser/ssl_host_state_delegate.h" |
| 28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 29 #include "content/public/test/browser_test_utils.h" | 29 #include "content/public/test/browser_test_utils.h" |
| 30 #include "net/test/cert_test_util.h" | 30 #include "net/test/cert_test_util.h" |
| 31 #include "net/test/test_data_directory.h" | 31 #include "net/test/test_data_directory.h" |
| 32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 EXPECT_EQ( | 623 EXPECT_EQ( |
| 624 content::SSLHostStateDelegate::ALLOWED, | 624 content::SSLHostStateDelegate::ALLOWED, |
| 625 state->QueryPolicy("localhost", *cert, | 625 state->QueryPolicy("localhost", *cert, |
| 626 net::CERT_STATUS_COMMON_NAME_INVALID, &unused_value)); | 626 net::CERT_STATUS_COMMON_NAME_INVALID, &unused_value)); |
| 627 | 627 |
| 628 EXPECT_EQ( | 628 EXPECT_EQ( |
| 629 content::SSLHostStateDelegate::ALLOWED, | 629 content::SSLHostStateDelegate::ALLOWED, |
| 630 state->QueryPolicy("127.0.0.1", *cert, | 630 state->QueryPolicy("127.0.0.1", *cert, |
| 631 net::CERT_STATUS_COMMON_NAME_INVALID, &unused_value)); | 631 net::CERT_STATUS_COMMON_NAME_INVALID, &unused_value)); |
| 632 } | 632 } |
| OLD | NEW |