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/extension_test_util.h" | 5 #include "chrome/common/extensions/extension_test_util.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 scoped_refptr<Extension> LoadManifest(const std::string& dir, | 63 scoped_refptr<Extension> LoadManifest(const std::string& dir, |
64 const std::string& test_file, | 64 const std::string& test_file, |
65 Manifest::Location location, | 65 Manifest::Location location, |
66 int extra_flags) { | 66 int extra_flags) { |
67 std::string error; | 67 std::string error; |
68 scoped_refptr<Extension> extension = | 68 scoped_refptr<Extension> extension = |
69 LoadManifestUnchecked(dir, test_file, location, extra_flags, &error); | 69 LoadManifestUnchecked(dir, test_file, location, extra_flags, &error); |
70 | 70 |
71 EXPECT_TRUE(extension) << test_file << ":" << error; | 71 EXPECT_TRUE(extension.get()) << test_file << ":" << error; |
72 return extension; | 72 return extension; |
73 } | 73 } |
74 | 74 |
75 scoped_refptr<Extension> LoadManifest(const std::string& dir, | 75 scoped_refptr<Extension> LoadManifest(const std::string& dir, |
76 const std::string& test_file, | 76 const std::string& test_file, |
77 int extra_flags) { | 77 int extra_flags) { |
78 return LoadManifest(dir, test_file, Manifest::INVALID_LOCATION, extra_flags); | 78 return LoadManifest(dir, test_file, Manifest::INVALID_LOCATION, extra_flags); |
79 } | 79 } |
80 | 80 |
81 scoped_refptr<Extension> LoadManifestStrict(const std::string& dir, | 81 scoped_refptr<Extension> LoadManifestStrict(const std::string& dir, |
82 const std::string& test_file) { | 82 const std::string& test_file) { |
83 return LoadManifest(dir, test_file, Extension::NO_FLAGS); | 83 return LoadManifest(dir, test_file, Extension::NO_FLAGS); |
84 } | 84 } |
85 | 85 |
86 scoped_refptr<Extension> LoadManifest(const std::string& dir, | 86 scoped_refptr<Extension> LoadManifest(const std::string& dir, |
87 const std::string& test_file) { | 87 const std::string& test_file) { |
88 return LoadManifest(dir, test_file, Extension::NO_FLAGS); | 88 return LoadManifest(dir, test_file, Extension::NO_FLAGS); |
89 } | 89 } |
90 | 90 |
91 } // namespace extension_test_util | 91 } // namespace extension_test_util |
OLD | NEW |