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 #include "chrome/browser/download/download_browsertest.h" | 5 #include "chrome/browser/download/download_browsertest.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <sstream> | 8 #include <sstream> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 const CheckDownloadCallback& callback) override { | 1076 const CheckDownloadCallback& callback) override { |
1077 callback.Run( | 1077 callback.Run( |
1078 safe_browsing::DownloadProtectionService::UNCOMMON); | 1078 safe_browsing::DownloadProtectionService::UNCOMMON); |
1079 } | 1079 } |
1080 }; | 1080 }; |
1081 | 1081 |
1082 class FakeSafeBrowsingService | 1082 class FakeSafeBrowsingService |
1083 : public safe_browsing::TestSafeBrowsingService, | 1083 : public safe_browsing::TestSafeBrowsingService, |
1084 public safe_browsing::ServicesDelegate::ServicesCreator { | 1084 public safe_browsing::ServicesDelegate::ServicesCreator { |
1085 public: | 1085 public: |
1086 FakeSafeBrowsingService() { | 1086 FakeSafeBrowsingService() |
| 1087 : TestSafeBrowsingService( |
| 1088 safe_browsing::V4FeatureList::V4UsageStatus::V4_DISABLED) { |
1087 services_delegate_ = | 1089 services_delegate_ = |
1088 safe_browsing::ServicesDelegate::CreateForTest(this, this); | 1090 safe_browsing::ServicesDelegate::CreateForTest(this, this); |
1089 } | 1091 } |
1090 | 1092 |
1091 protected: | 1093 protected: |
1092 ~FakeSafeBrowsingService() override {} | 1094 ~FakeSafeBrowsingService() override {} |
1093 | 1095 |
1094 // ServicesDelegate::ServicesCreator: | 1096 // ServicesDelegate::ServicesCreator: |
1095 bool CanCreateDownloadProtectionService() override { return true; } | 1097 bool CanCreateDownloadProtectionService() override { return true; } |
1096 bool CanCreateIncidentReportingService() override { return false; } | 1098 bool CanCreateIncidentReportingService() override { return false; } |
(...skipping 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3798 browser(), 1, | 3800 browser(), 1, |
3799 content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY)); | 3801 content::DownloadTestObserver::ON_DANGEROUS_DOWNLOAD_DENY)); |
3800 ui_test_utils::NavigateToURL(browser(), extension_url); | 3802 ui_test_utils::NavigateToURL(browser(), extension_url); |
3801 | 3803 |
3802 observer->WaitForFinished(); | 3804 observer->WaitForFinished(); |
3803 | 3805 |
3804 // Download shelf should close. | 3806 // Download shelf should close. |
3805 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); | 3807 EXPECT_FALSE(browser()->window()->IsDownloadShelfVisible()); |
3806 } | 3808 } |
3807 #endif // defined(OS_CHROMEOS) | 3809 #endif // defined(OS_CHROMEOS) |
OLD | NEW |