| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "chrome/browser/extensions/image_loading_tracker.h" | 7 #include "chrome/browser/extensions/image_loading_tracker.h" |
| 8 #include "chrome/common/chrome_notification_types.h" | 8 #include "chrome/common/chrome_notification_types.h" |
| 9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| 11 #include "chrome/common/extensions/extension_icon_set.h" | 11 #include "chrome/common/extensions/extension_icon_set.h" |
| 12 #include "chrome/common/extensions/extension_resource.h" | 12 #include "chrome/common/extensions/extension_resource.h" |
| 13 #include "chrome/test/testing_browser_process_test.h" | 13 #include "chrome/test/base/testing_browser_process_test.h" |
| 14 #include "content/browser/browser_thread.h" | 14 #include "content/browser/browser_thread.h" |
| 15 #include "content/common/json_value_serializer.h" | 15 #include "content/common/json_value_serializer.h" |
| 16 #include "content/common/notification_service.h" | 16 #include "content/common/notification_service.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
| 19 #include "ui/gfx/size.h" | 19 #include "ui/gfx/size.h" |
| 20 | 20 |
| 21 class ImageLoadingTrackerTest : public TestingBrowserProcessTest, | 21 class ImageLoadingTrackerTest : public TestingBrowserProcessTest, |
| 22 public ImageLoadingTracker::Observer { | 22 public ImageLoadingTracker::Observer { |
| 23 public: | 23 public: |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 WaitForImageLoad(); | 175 WaitForImageLoad(); |
| 176 | 176 |
| 177 // Even though we deleted the extension, we should still get the image. | 177 // Even though we deleted the extension, we should still get the image. |
| 178 // We should still have gotten the image. | 178 // We should still have gotten the image. |
| 179 EXPECT_EQ(1, image_loaded_count()); | 179 EXPECT_EQ(1, image_loaded_count()); |
| 180 | 180 |
| 181 // Check that the image was loaded. | 181 // Check that the image was loaded. |
| 182 EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH, image_.width()); | 182 EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH, image_.width()); |
| 183 } | 183 } |
| OLD | NEW |