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

Side by Side Diff: chrome/common/extensions/extension_unittest.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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
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/common/extensions/extension.h" 5 #include "chrome/common/extensions/extension.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
16 #include "chrome/common/extensions/extension_action.h" 16 #include "chrome/common/extensions/extension_action.h"
17 #include "chrome/common/extensions/extension_error_utils.h" 17 #include "chrome/common/extensions/extension_error_utils.h"
18 #include "chrome/common/extensions/extension_file_util.h" 18 #include "chrome/common/extensions/extension_file_util.h"
19 #include "chrome/common/extensions/extension_manifest_constants.h" 19 #include "chrome/common/extensions/extension_manifest_constants.h"
20 #include "chrome/common/extensions/extension_resource.h" 20 #include "chrome/common/extensions/extension_resource.h"
21 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
22 #include "googleurl/src/gurl.h" 22 #include "googleurl/src/gurl.h"
23 #include "net/base/mime_sniffer.h" 23 #include "net/base/mime_sniffer.h"
24 #include "skia/ext/image_operations.h" 24 #include "skia/ext/image_operations.h"
25 #include "net/base/mock_host_resolver.h" 25 #include "net/base/mock_host_resolver.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 #include "third_party/skia/include/core/SkBitmap.h" 27 #include "third_party/skia/include/core/SkBitmap.h"
28 #include "ui/gfx/codec/png_codec.h" 28 #include "ui/gfx/codec/png_codec.h"
29 29
30 using extensions::Extension;
31
30 namespace keys = extension_manifest_keys; 32 namespace keys = extension_manifest_keys;
31 namespace values = extension_manifest_values; 33 namespace values = extension_manifest_values;
32 namespace errors = extension_manifest_errors; 34 namespace errors = extension_manifest_errors;
33 35
34 namespace { 36 namespace {
35 37
36 void CompareLists(const std::vector<std::string>& expected, 38 void CompareLists(const std::vector<std::string>& expected,
37 const std::vector<std::string>& actual) { 39 const std::vector<std::string>& actual) {
38 ASSERT_EQ(expected.size(), actual.size()); 40 ASSERT_EQ(expected.size(), actual.size());
39 41
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 } 965 }
964 966
965 TEST(ExtensionTest, GetSyncTypeExtensionWithTwoPlugins) { 967 TEST(ExtensionTest, GetSyncTypeExtensionWithTwoPlugins) {
966 scoped_refptr<Extension> extension( 968 scoped_refptr<Extension> extension(
967 MakeSyncTestExtension(EXTENSION, GURL(), GURL(), 969 MakeSyncTestExtension(EXTENSION, GURL(), GURL(),
968 Extension::INTERNAL, 2, FilePath())); 970 Extension::INTERNAL, 2, FilePath()));
969 if (extension) 971 if (extension)
970 EXPECT_EQ(extension->GetSyncType(), Extension::SYNC_TYPE_NONE); 972 EXPECT_EQ(extension->GetSyncType(), Extension::SYNC_TYPE_NONE);
971 } 973 }
972 #endif // !defined(OS_CHROMEOS) 974 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_test_util.cc ('k') | chrome/common/extensions/extension_unpacker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698