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.h" | 13 #include "chrome/common/extensions/extension.h" |
14 #include "chrome/common/extensions/extension_l10n_util.h" | 14 #include "chrome/common/extensions/extension_l10n_util.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() : enable_apps_(true) {} | 19 ExtensionManifestTest::ExtensionManifestTest() |
| 20 : enable_apps_(true), |
| 21 current_channel_(chrome::VersionInfo::CHANNEL_DEV) {} |
20 | 22 |
21 // static | 23 // static |
22 DictionaryValue* ExtensionManifestTest::LoadManifestFile( | 24 DictionaryValue* ExtensionManifestTest::LoadManifestFile( |
23 const std::string& filename, | 25 const std::string& filename, |
24 std::string* error) { | 26 std::string* error) { |
25 FilePath filename_path(FilePath::FromUTF8Unsafe(filename)); | 27 FilePath filename_path(FilePath::FromUTF8Unsafe(filename)); |
26 FilePath extension_path; | 28 FilePath extension_path; |
27 FilePath manifest_path; | 29 FilePath manifest_path; |
28 | 30 |
29 if (filename_path.IsAbsolute()) { | 31 if (filename_path.IsAbsolute()) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 break; | 236 break; |
235 case EXPECT_TYPE_SUCCESS: | 237 case EXPECT_TYPE_SUCCESS: |
236 for (size_t i = 0; i < num_testcases; ++i) { | 238 for (size_t i = 0; i < num_testcases; ++i) { |
237 LoadAndExpectSuccess(testcases[i].manifest_filename_.c_str(), | 239 LoadAndExpectSuccess(testcases[i].manifest_filename_.c_str(), |
238 testcases[i].location_, | 240 testcases[i].location_, |
239 testcases[i].flags_); | 241 testcases[i].flags_); |
240 } | 242 } |
241 break; | 243 break; |
242 } | 244 } |
243 } | 245 } |
OLD | NEW |