| 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/safe_browsing/remote_database_manager.h" | 10 #include "components/safe_browsing_db/remote_database_manager.h" |
| 11 #include "chrome/browser/safe_browsing/safe_browsing_api_handler.h" | 11 #include "components/safe_browsing_db/safe_browsing_api_handler.h" |
| 12 #include "components/variations/variations_associated_data.h" | 12 #include "components/variations/variations_associated_data.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace safe_browsing { | 15 namespace safe_browsing { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 class TestSafeBrowsingApiHandler : public SafeBrowsingApiHandler { | 19 class TestSafeBrowsingApiHandler : public SafeBrowsingApiHandler { |
| 20 public: | 20 public: |
| 21 void StartURLCheck(const URLCheckCallback& callback, | 21 void StartURLCheck(const URLCheckCallback& callback, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 EXPECT_TRUE(db_->CanCheckResourceType(content::RESOURCE_TYPE_SUB_FRAME)); | 94 EXPECT_TRUE(db_->CanCheckResourceType(content::RESOURCE_TYPE_SUB_FRAME)); |
| 95 EXPECT_TRUE(db_->CanCheckResourceType(content::RESOURCE_TYPE_STYLESHEET)); | 95 EXPECT_TRUE(db_->CanCheckResourceType(content::RESOURCE_TYPE_STYLESHEET)); |
| 96 EXPECT_FALSE(db_->CanCheckResourceType(content::RESOURCE_TYPE_SCRIPT)); | 96 EXPECT_FALSE(db_->CanCheckResourceType(content::RESOURCE_TYPE_SCRIPT)); |
| 97 EXPECT_FALSE(db_->CanCheckResourceType(content::RESOURCE_TYPE_IMAGE)); | 97 EXPECT_FALSE(db_->CanCheckResourceType(content::RESOURCE_TYPE_IMAGE)); |
| 98 // ... | 98 // ... |
| 99 EXPECT_FALSE(db_->CanCheckResourceType(content::RESOURCE_TYPE_MEDIA)); | 99 EXPECT_FALSE(db_->CanCheckResourceType(content::RESOURCE_TYPE_MEDIA)); |
| 100 EXPECT_TRUE(db_->CanCheckResourceType(content::RESOURCE_TYPE_WORKER)); | 100 EXPECT_TRUE(db_->CanCheckResourceType(content::RESOURCE_TYPE_WORKER)); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace safe_browsing | 103 } // namespace safe_browsing |
| OLD | NEW |