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 <algorithm> | |
Jeffrey Yasskin
2014/03/04 01:41:48
You don't use these new #includes anymore.
scheib
2014/03/04 15:34:31
Done.
| |
8 | |
7 #include "base/file_util.h" | 9 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
9 #include "base/json/json_file_value_serializer.h" | 11 #include "base/json/json_file_value_serializer.h" |
12 #include "base/json/json_string_value_serializer.h" | |
10 #include "base/path_service.h" | 13 #include "base/path_service.h" |
11 #include "base/values.h" | 14 #include "base/values.h" |
12 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
13 #include "chrome/common/extensions/extension_l10n_util.h" | 16 #include "chrome/common/extensions/extension_l10n_util.h" |
14 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
15 | 18 |
16 using extensions::Extension; | 19 using extensions::Extension; |
17 | 20 |
18 namespace { | 21 namespace { |
19 | 22 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 ExtensionManifestTest::Manifest::Manifest(const char* name) | 63 ExtensionManifestTest::Manifest::Manifest(const char* name) |
61 : name_(name), manifest_(NULL) { | 64 : name_(name), manifest_(NULL) { |
62 } | 65 } |
63 | 66 |
64 ExtensionManifestTest::Manifest::Manifest(base::DictionaryValue* manifest, | 67 ExtensionManifestTest::Manifest::Manifest(base::DictionaryValue* manifest, |
65 const char* name) | 68 const char* name) |
66 : name_(name), manifest_(manifest) { | 69 : name_(name), manifest_(manifest) { |
67 CHECK(manifest_) << "Manifest NULL"; | 70 CHECK(manifest_) << "Manifest NULL"; |
68 } | 71 } |
69 | 72 |
73 ExtensionManifestTest::Manifest::Manifest( | |
74 scoped_ptr<base::DictionaryValue> manifest, | |
75 const char* name) | |
76 : name_(name), | |
77 manifest_(manifest.get()), | |
78 manifest_holder_(manifest.Pass()) { | |
79 CHECK(manifest_) << "Manifest NULL"; | |
80 } | |
81 | |
70 ExtensionManifestTest::Manifest::Manifest(const Manifest& m) { | 82 ExtensionManifestTest::Manifest::Manifest(const Manifest& m) { |
71 NOTREACHED(); | 83 NOTREACHED(); |
72 } | 84 } |
73 | 85 |
74 ExtensionManifestTest::Manifest::~Manifest() { | 86 ExtensionManifestTest::Manifest::~Manifest() { |
75 } | 87 } |
76 | 88 |
77 base::DictionaryValue* ExtensionManifestTest::Manifest::GetManifest( | 89 base::DictionaryValue* ExtensionManifestTest::Manifest::GetManifest( |
78 char const* test_data_dir, std::string* error) const { | 90 char const* test_data_dir, std::string* error) const { |
79 if (manifest_) | 91 if (manifest_) |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
250 testcase.location_, | 262 testcase.location_, |
251 testcase.flags_); | 263 testcase.flags_); |
252 break; | 264 break; |
253 case EXPECT_TYPE_SUCCESS: | 265 case EXPECT_TYPE_SUCCESS: |
254 LoadAndExpectSuccess(testcase.manifest_filename_.c_str(), | 266 LoadAndExpectSuccess(testcase.manifest_filename_.c_str(), |
255 testcase.location_, | 267 testcase.location_, |
256 testcase.flags_); | 268 testcase.flags_); |
257 break; | 269 break; |
258 } | 270 } |
259 } | 271 } |
OLD | NEW |