Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: chrome/browser/extensions/image_loading_tracker_unittest.cc

Issue 2934004: Try to cut down Browser/TabContents header dependencies. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix unit tests compile Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/history/history_types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chrome_thread.h" 7 #include "chrome/browser/chrome_thread.h"
8 #include "chrome/browser/extensions/image_loading_tracker.h" 8 #include "chrome/browser/extensions/image_loading_tracker.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_resource.h" 11 #include "chrome/common/extensions/extension_resource.h"
12 #include "chrome/common/json_value_serializer.h" 12 #include "chrome/common/json_value_serializer.h"
13 #include "chrome/common/notification_service.h" 13 #include "chrome/common/notification_service.h"
14 #include "chrome/common/notification_type.h" 14 #include "chrome/common/notification_type.h"
15 #include "gfx/size.h" 15 #include "gfx/size.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "third_party/skia/include/core/SkBitmap.h"
17 18
18 class ImageLoadingTrackerTest : public testing::Test, 19 class ImageLoadingTrackerTest : public testing::Test,
19 public ImageLoadingTracker::Observer { 20 public ImageLoadingTracker::Observer {
20 public: 21 public:
21 ImageLoadingTrackerTest() 22 ImageLoadingTrackerTest()
22 : image_loaded_count_(0), 23 : image_loaded_count_(0),
23 quit_in_image_loaded_(false), 24 quit_in_image_loaded_(false),
24 ui_thread_(ChromeThread::UI, &ui_loop_), 25 ui_thread_(ChromeThread::UI, &ui_loop_),
25 file_thread_(ChromeThread::FILE), 26 file_thread_(ChromeThread::FILE),
26 io_thread_(ChromeThread::IO) { 27 io_thread_(ChromeThread::IO) {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 171
171 WaitForImageLoad(); 172 WaitForImageLoad();
172 173
173 // Even though we deleted the extension, we should still get the image. 174 // Even though we deleted the extension, we should still get the image.
174 // We should still have gotten the image. 175 // We should still have gotten the image.
175 EXPECT_EQ(1, image_loaded_count()); 176 EXPECT_EQ(1, image_loaded_count());
176 177
177 // Check that the image was loaded. 178 // Check that the image was loaded.
178 EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH, image_.width()); 179 EXPECT_EQ(Extension::EXTENSION_ICON_SMALLISH, image_.width());
179 } 180 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/history/history_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698