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 CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ |
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_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 "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
12 #include "chrome/common/extensions/extension_manifest_constants.h" | 12 #include "chrome/common/extensions/extension_manifest_constants.h" |
13 #include "chrome/common/extensions/extension_unittest.h" | |
14 #include "chrome/common/extensions/features/feature.h" | 13 #include "chrome/common/extensions/features/feature.h" |
15 #include "chrome/common/extensions/manifest.h" | 14 #include "chrome/common/extensions/manifest.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
17 | 16 |
18 class ExtensionManifestTest : public extensions::ExtensionTest { | 17 class ExtensionManifestTest : public testing::Test { |
19 public: | 18 public: |
20 ExtensionManifestTest(); | 19 ExtensionManifestTest(); |
21 | 20 |
22 protected: | 21 protected: |
23 // Helper class that simplifies creating methods that take either a filename | 22 // Helper class that simplifies creating methods that take either a filename |
24 // to a manifest or the manifest itself. | 23 // to a manifest or the manifest itself. |
25 class Manifest { | 24 class Manifest { |
26 public: | 25 public: |
27 explicit Manifest(const char* name); | 26 explicit Manifest(const char* name); |
28 Manifest(DictionaryValue* manifest, const char* name); | 27 Manifest(DictionaryValue* manifest, const char* name); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // Force the manifest tests to run as though they are on trunk, since several | 146 // Force the manifest tests to run as though they are on trunk, since several |
148 // tests rely on manifest features being available that aren't on | 147 // tests rely on manifest features being available that aren't on |
149 // stable/beta. | 148 // stable/beta. |
150 // | 149 // |
151 // These objects nest, so if a test wants to explicitly test the behaviour | 150 // These objects nest, so if a test wants to explicitly test the behaviour |
152 // on stable or beta, declare it inside that test. | 151 // on stable or beta, declare it inside that test. |
153 extensions::Feature::ScopedCurrentChannel current_channel_; | 152 extensions::Feature::ScopedCurrentChannel current_channel_; |
154 }; | 153 }; |
155 | 154 |
156 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ | 155 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ |
OLD | NEW |