| 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 "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" | 5 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/macros.h" |
| 7 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h" | 10 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h" |
| 8 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
| 9 #include "content/public/test/test_browser_thread_bundle.h" | 12 #include "content/public/test/test_browser_thread_bundle.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 14 |
| 12 namespace { | 15 namespace { |
| 13 | 16 |
| 14 class TestNotificationInterface { | 17 class TestNotificationInterface { |
| 15 public: | 18 public: |
| 16 virtual ~TestNotificationInterface() {} | 19 virtual ~TestNotificationInterface() {} |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 service_->RequestImage(url1_, new TestObserver(this)); | 192 service_->RequestImage(url1_, new TestObserver(this)); |
| 190 service_->RequestImage(url2_, new TestObserver(this)); | 193 service_->RequestImage(url2_, new TestObserver(this)); |
| 191 EXPECT_EQ(0U, cache_size()); | 194 EXPECT_EQ(0U, cache_size()); |
| 192 | 195 |
| 193 CompleteFetch(url1_); | 196 CompleteFetch(url1_); |
| 194 EXPECT_EQ(1U, cache_size()); | 197 EXPECT_EQ(1U, cache_size()); |
| 195 | 198 |
| 196 FailFetch(url2_); | 199 FailFetch(url2_); |
| 197 EXPECT_EQ(1U, cache_size()); | 200 EXPECT_EQ(1U, cache_size()); |
| 198 } | 201 } |
| OLD | NEW |