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/values.h" | 8 #include "base/values.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
11 #include "chrome/common/extensions/extension_manifest_constants.h" | 11 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 12 #include "chrome/common/extensions/features/feature.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace errors = extension_manifest_errors; | 15 namespace errors = extension_manifest_errors; |
15 namespace keys = extension_manifest_keys; | 16 namespace keys = extension_manifest_keys; |
16 | 17 |
17 class ExtensionManifestTest : public testing::Test { | 18 class ExtensionManifestTest : public testing::Test { |
18 public: | 19 public: |
19 ExtensionManifestTest(); | 20 ExtensionManifestTest(); |
20 | 21 |
21 protected: | 22 protected: |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 129 |
129 Testcase(std::string manifest_filename, | 130 Testcase(std::string manifest_filename, |
130 extensions::Extension::Location location, | 131 extensions::Extension::Location location, |
131 int flags); | 132 int flags); |
132 }; | 133 }; |
133 | 134 |
134 void RunTestcases(const Testcase* testcases, size_t num_testcases, | 135 void RunTestcases(const Testcase* testcases, size_t num_testcases, |
135 EXPECT_TYPE type); | 136 EXPECT_TYPE type); |
136 | 137 |
137 bool enable_apps_; | 138 bool enable_apps_; |
| 139 |
| 140 // Force the manifest tests to run as though it were dev channel, since |
| 141 // several tests rely on manifest features being available that aren't |
| 142 // on stable/beta. |
| 143 // |
| 144 // These objects nest, so if a test wants to explicitly test the behaviour |
| 145 // on stable or beta, declare it inside that test. |
| 146 extensions::Feature::ScopedCurrentChannel current_channel_; |
138 }; | 147 }; |
139 | 148 |
140 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ | 149 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ |
OLD | NEW |