OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "components/safe_browsing/password_protection/password_protection_servi
ce.h" | 4 #include "components/safe_browsing/password_protection/password_protection_servi
ce.h" |
5 | 5 |
6 #include "base/memory/ptr_util.h" | 6 #include "base/memory/ptr_util.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/single_thread_task_runner.h" |
8 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
9 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
10 #include "base/test/null_task_runner.h" | 11 #include "base/test/null_task_runner.h" |
11 #include "components/content_settings/core/browser/host_content_settings_map.h" | 12 #include "components/content_settings/core/browser/host_content_settings_map.h" |
12 #include "components/safe_browsing/password_protection/password_protection_reque
st.h" | 13 #include "components/safe_browsing/password_protection/password_protection_reque
st.h" |
13 #include "components/safe_browsing_db/test_database_manager.h" | 14 #include "components/safe_browsing_db/test_database_manager.h" |
14 #include "components/sync_preferences/testing_pref_service_syncable.h" | 15 #include "components/sync_preferences/testing_pref_service_syncable.h" |
15 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
16 #include "net/url_request/test_url_fetcher_factory.h" | 17 #include "net/url_request/test_url_fetcher_factory.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 18 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 EXPECT_EQ(LoginReputationClientResponse::VERDICT_TYPE_UNSPECIFIED, | 573 EXPECT_EQ(LoginReputationClientResponse::VERDICT_TYPE_UNSPECIFIED, |
573 password_protection_service_->GetCachedVerdict( | 574 password_protection_service_->GetCachedVerdict( |
574 GURL("https://foo.com/def/index.jsp"), &actual_verdict)); | 575 GURL("https://foo.com/def/index.jsp"), &actual_verdict)); |
575 // Nothing in content setting for bar.com. | 576 // Nothing in content setting for bar.com. |
576 EXPECT_EQ(nullptr, content_setting_map_->GetWebsiteSetting( | 577 EXPECT_EQ(nullptr, content_setting_map_->GetWebsiteSetting( |
577 GURL("https://bar.com"), GURL(), | 578 GURL("https://bar.com"), GURL(), |
578 CONTENT_SETTINGS_TYPE_PASSWORD_PROTECTION, | 579 CONTENT_SETTINGS_TYPE_PASSWORD_PROTECTION, |
579 std::string(), nullptr)); | 580 std::string(), nullptr)); |
580 } | 581 } |
581 } // namespace safe_browsing | 582 } // namespace safe_browsing |
OLD | NEW |