OLD | NEW |
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/manifest_tests/extension_manifest_test.h" | 5 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/values.h" | 9 #include "base/values.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 "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
13 #include "chrome/common/extensions/extension_l10n_util.h" | 13 #include "chrome/common/extensions/extension_l10n_util.h" |
14 #include "chrome/common/extensions/manifest_handler.h" | 14 #include "chrome/common/extensions/manifest_handler.h" |
15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
16 | 16 |
17 using extensions::Extension; | 17 using extensions::Extension; |
18 | 18 |
19 ExtensionManifestTest::ExtensionManifestTest() | 19 ExtensionManifestTest::ExtensionManifestTest() |
20 : enable_apps_(true), | 20 : enable_apps_(true), |
21 // UNKNOWN == trunk. | 21 // UNKNOWN == trunk. |
22 current_channel_(chrome::VersionInfo::CHANNEL_UNKNOWN) {} | 22 current_channel_(chrome::VersionInfo::CHANNEL_UNKNOWN) {} |
23 | 23 |
24 void ExtensionManifestTest::SetUp() { | 24 void ExtensionManifestTest::TearDown() { |
25 extensions::ManifestHandler::ClearRegistryForTesting(); | 25 extensions::ManifestHandler::ClearRegistryForTesting(); |
26 } | 26 } |
27 | 27 |
28 // static | 28 // static |
29 DictionaryValue* ExtensionManifestTest::LoadManifestFile( | 29 DictionaryValue* ExtensionManifestTest::LoadManifestFile( |
30 const std::string& filename, | 30 const std::string& filename, |
31 std::string* error) { | 31 std::string* error) { |
32 base::FilePath filename_path(base::FilePath::FromUTF8Unsafe(filename)); | 32 base::FilePath filename_path(base::FilePath::FromUTF8Unsafe(filename)); |
33 base::FilePath extension_path; | 33 base::FilePath extension_path; |
34 base::FilePath manifest_path; | 34 base::FilePath manifest_path; |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 break; | 243 break; |
244 case EXPECT_TYPE_SUCCESS: | 244 case EXPECT_TYPE_SUCCESS: |
245 for (size_t i = 0; i < num_testcases; ++i) { | 245 for (size_t i = 0; i < num_testcases; ++i) { |
246 LoadAndExpectSuccess(testcases[i].manifest_filename_.c_str(), | 246 LoadAndExpectSuccess(testcases[i].manifest_filename_.c_str(), |
247 testcases[i].location_, | 247 testcases[i].location_, |
248 testcases[i].flags_); | 248 testcases[i].flags_); |
249 } | 249 } |
250 break; | 250 break; |
251 } | 251 } |
252 } | 252 } |
OLD | NEW |