| 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 #ifndef EXTENSIONS_COMMON_MANIFEST_TEST_H_ | 5 #ifndef EXTENSIONS_COMMON_MANIFEST_TEST_H_ |
| 6 #define EXTENSIONS_COMMON_MANIFEST_TEST_H_ | 6 #define EXTENSIONS_COMMON_MANIFEST_TEST_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "extensions/common/extension.h" | 11 #include "extensions/common/extension.h" |
| 12 #include "extensions/common/manifest.h" | 12 #include "extensions/common/manifest.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class FilePath; | 16 class FilePath; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace extensions { | 19 namespace extensions { |
| 20 | 20 |
| 21 // Base class for tests that parse a manifest file. | 21 // Base class for tests that parse a manifest file. |
| 22 class ManifestTest : public testing::Test { | 22 class ManifestTest : public testing::Test { |
| 23 public: | 23 public: |
| 24 ManifestTest(); | 24 ManifestTest(); |
| 25 virtual ~ManifestTest(); | 25 ~ManifestTest() override; |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 // Helper class that simplifies creating methods that take either a filename | 28 // Helper class that simplifies creating methods that take either a filename |
| 29 // to a manifest or the manifest itself. | 29 // to a manifest or the manifest itself. |
| 30 class ManifestData { | 30 class ManifestData { |
| 31 public: | 31 public: |
| 32 explicit ManifestData(const char* name); | 32 explicit ManifestData(const char* name); |
| 33 ManifestData(base::DictionaryValue* manifest, const char* name); | 33 ManifestData(base::DictionaryValue* manifest, const char* name); |
| 34 explicit ManifestData(scoped_ptr<base::DictionaryValue> manifest); | 34 explicit ManifestData(scoped_ptr<base::DictionaryValue> manifest); |
| 35 // C++98 requires the copy constructor for a type to be visible if you | 35 // C++98 requires the copy constructor for a type to be visible if you |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 151 |
| 152 bool enable_apps_; | 152 bool enable_apps_; |
| 153 | 153 |
| 154 private: | 154 private: |
| 155 DISALLOW_COPY_AND_ASSIGN(ManifestTest); | 155 DISALLOW_COPY_AND_ASSIGN(ManifestTest); |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace extensions | 158 } // namespace extensions |
| 159 | 159 |
| 160 #endif // EXTENSIONS_COMMON_MANIFEST_TEST_H_ | 160 #endif // EXTENSIONS_COMMON_MANIFEST_TEST_H_ |
| OLD | NEW |