| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "chrome/browser/extensions/blacklist.h" | 9 #include "chrome/browser/extensions/blacklist.h" |
| 10 #include "chrome/browser/extensions/blacklist_state_fetcher.h" | 10 #include "chrome/browser/extensions/blacklist_state_fetcher.h" |
| 11 #include "chrome/browser/extensions/extension_prefs.h" | |
| 12 #include "chrome/browser/extensions/fake_safe_browsing_database_manager.h" | 11 #include "chrome/browser/extensions/fake_safe_browsing_database_manager.h" |
| 13 #include "chrome/browser/extensions/test_blacklist.h" | 12 #include "chrome/browser/extensions/test_blacklist.h" |
| 14 #include "chrome/browser/extensions/test_blacklist_state_fetcher.h" | 13 #include "chrome/browser/extensions/test_blacklist_state_fetcher.h" |
| 15 #include "chrome/browser/extensions/test_extension_prefs.h" | 14 #include "chrome/browser/extensions/test_extension_prefs.h" |
| 16 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
| 16 #include "extensions/browser/extension_prefs.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 std::set<std::string> Set(const std::string& a) { | 22 std::set<std::string> Set(const std::string& a) { |
| 23 std::set<std::string> set; | 23 std::set<std::string> set; |
| 24 set.insert(a); | 24 set.insert(a); |
| 25 return set; | 25 return set; |
| 26 } | 26 } |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 base::RunLoop().RunUntilIdle(); | 253 base::RunLoop().RunUntilIdle(); |
| 254 | 254 |
| 255 // No new fetchers. | 255 // No new fetchers. |
| 256 EXPECT_FALSE(fetcher_tester.HandleFetcher(2)); | 256 EXPECT_FALSE(fetcher_tester.HandleFetcher(2)); |
| 257 EXPECT_EQ(BLACKLISTED_CWS_POLICY_VIOLATION, cached_states[a]); | 257 EXPECT_EQ(BLACKLISTED_CWS_POLICY_VIOLATION, cached_states[a]); |
| 258 EXPECT_EQ(BLACKLISTED_POTENTIALLY_UNWANTED, cached_states[b]); | 258 EXPECT_EQ(BLACKLISTED_POTENTIALLY_UNWANTED, cached_states[b]); |
| 259 EXPECT_EQ(cached_states.end(), cached_states.find(c)); | 259 EXPECT_EQ(cached_states.end(), cached_states.find(c)); |
| 260 } | 260 } |
| 261 | 261 |
| 262 } // namespace extensions | 262 } // namespace extensions |
| OLD | NEW |