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 <string> | 5 #include <string> |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "chrome/browser/image_holder.h" | 8 #include "chrome/browser/image_holder.h" |
8 #include "content/public/test/test_browser_thread_bundle.h" | 9 #include "content/public/test/test_browser_thread_bundle.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 const char kIconUrl1[] = "http://www.google.com/icon1.jpg"; | 14 const char kIconUrl1[] = "http://www.google.com/icon1.jpg"; |
14 const char kIconUrl2[] = "http://www.google.com/icon2.jpg"; | 15 const char kIconUrl2[] = "http://www.google.com/icon2.jpg"; |
15 | 16 |
16 class TestDelegate : public chrome::ImageHolderDelegate { | 17 class TestDelegate : public chrome::ImageHolderDelegate { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 image_holder2.OnFetchComplete(GURL(kIconUrl2), &bitmap); | 104 image_holder2.OnFetchComplete(GURL(kIconUrl2), &bitmap); |
104 image_holder3.OnFetchComplete(GURL(kIconUrl2), &bitmap); | 105 image_holder3.OnFetchComplete(GURL(kIconUrl2), &bitmap); |
105 image_holder4.OnFetchComplete(GURL(kIconUrl2), &bitmap); | 106 image_holder4.OnFetchComplete(GURL(kIconUrl2), &bitmap); |
106 EXPECT_TRUE(image_holder1.IsFetchingDone()); | 107 EXPECT_TRUE(image_holder1.IsFetchingDone()); |
107 EXPECT_TRUE(image_holder2.IsFetchingDone()); | 108 EXPECT_TRUE(image_holder2.IsFetchingDone()); |
108 EXPECT_TRUE(image_holder3.IsFetchingDone()); | 109 EXPECT_TRUE(image_holder3.IsFetchingDone()); |
109 EXPECT_TRUE(image_holder4.IsFetchingDone()); | 110 EXPECT_TRUE(image_holder4.IsFetchingDone()); |
110 } | 111 } |
111 | 112 |
112 } // namespace chrome. | 113 } // namespace chrome. |
OLD | NEW |