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 "components/search_provider_logos/logo_cache.h" | 5 #include "components/search_provider_logos/logo_cache.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/file_util.h" | 11 #include "base/files/file_util.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace search_provider_logos { | 17 namespace search_provider_logos { |
18 | 18 |
19 LogoMetadata GetExampleMetadata() { | 19 LogoMetadata GetExampleMetadata() { |
20 LogoMetadata metadata; | 20 LogoMetadata metadata; |
21 metadata.source_url = "http://google.com/mylogo"; | 21 metadata.source_url = "http://google.com/mylogo"; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 ExpectLogo(NULL); | 243 ExpectLogo(NULL); |
244 // Once the logo is noticed to be NULL, the metadata should also be cleared. | 244 // Once the logo is noticed to be NULL, the metadata should also be cleared. |
245 ExpectMetadata(NULL); | 245 ExpectMetadata(NULL); |
246 | 246 |
247 // Ensure corrupt cache files are deleted. | 247 // Ensure corrupt cache files are deleted. |
248 EXPECT_FALSE(base::PathExists(cache_->GetMetadataPath())); | 248 EXPECT_FALSE(base::PathExists(cache_->GetMetadataPath())); |
249 EXPECT_FALSE(base::PathExists(cache_->GetLogoPath())); | 249 EXPECT_FALSE(base::PathExists(cache_->GetLogoPath())); |
250 } | 250 } |
251 | 251 |
252 } // namespace search_provider_logos | 252 } // namespace search_provider_logos |
OLD | NEW |