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

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

Issue 12578008: Move CrxFile, FileReader, ExtensionResource to src/extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/image_loader.h ('k') | chrome/browser/extensions/installed_loader.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/image_loader.h" 5 #include "chrome/browser/extensions/image_loader.h"
6 6
7 #include "base/json/json_file_value_serializer.h" 7 #include "base/json/json_file_value_serializer.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
11 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
12 #include "chrome/common/extensions/api/icons/icons_handler.h" 12 #include "chrome/common/extensions/api/icons/icons_handler.h"
13 #include "chrome/common/extensions/extension.h" 13 #include "chrome/common/extensions/extension.h"
14 #include "chrome/common/extensions/extension_constants.h" 14 #include "chrome/common/extensions/extension_constants.h"
15 #include "chrome/common/extensions/extension_icon_set.h" 15 #include "chrome/common/extensions/extension_icon_set.h"
16 #include "chrome/common/extensions/extension_resource.h"
17 #include "chrome/common/extensions/manifest.h" 16 #include "chrome/common/extensions/manifest.h"
18 #include "chrome/common/extensions/manifest_handler.h" 17 #include "chrome/common/extensions/manifest_handler.h"
19 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
20 #include "content/public/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
20 #include "extensions/common/extension_resource.h"
21 #include "grit/component_extension_resources.h" 21 #include "grit/component_extension_resources.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 #include "third_party/skia/include/core/SkBitmap.h" 23 #include "third_party/skia/include/core/SkBitmap.h"
24 #include "ui/gfx/image/image.h" 24 #include "ui/gfx/image/image.h"
25 #include "ui/gfx/image/image_skia.h" 25 #include "ui/gfx/image/image_skia.h"
26 #include "ui/gfx/size.h" 26 #include "ui/gfx/size.h"
27 27
28 using content::BrowserThread; 28 using content::BrowserThread;
29 using extensions::Extension; 29 using extensions::Extension;
30 using extensions::ExtensionResource;
30 using extensions::ImageLoader; 31 using extensions::ImageLoader;
31 using extensions::Manifest; 32 using extensions::Manifest;
32 33
33 class ImageLoaderTest : public testing::Test { 34 class ImageLoaderTest : public testing::Test {
34 public: 35 public:
35 ImageLoaderTest() 36 ImageLoaderTest()
36 : image_loaded_count_(0), 37 : image_loaded_count_(0),
37 quit_in_image_loaded_(false), 38 quit_in_image_loaded_(false),
38 ui_thread_(BrowserThread::UI, &ui_loop_), 39 ui_thread_(BrowserThread::UI, &ui_loop_),
39 file_thread_(BrowserThread::FILE), 40 file_thread_(BrowserThread::FILE),
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 258
258 #if defined(FILE_MANAGER_EXTENSION) 259 #if defined(FILE_MANAGER_EXTENSION)
259 int resource_id; 260 int resource_id;
260 ASSERT_EQ(true, 261 ASSERT_EQ(true,
261 ImageLoader::IsComponentExtensionResource(extension->path(), 262 ImageLoader::IsComponentExtensionResource(extension->path(),
262 resource.relative_path(), 263 resource.relative_path(),
263 &resource_id)); 264 &resource_id));
264 ASSERT_EQ(IDR_FILE_MANAGER_ICON_16, resource_id); 265 ASSERT_EQ(IDR_FILE_MANAGER_ICON_16, resource_id);
265 #endif 266 #endif
266 } 267 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/image_loader.h ('k') | chrome/browser/extensions/installed_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698