Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifest_test.h

Issue 10826298: Force the channel to be dev for active tab and manfiest unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/active_tab_unittest.cc ('k') | chrome/common/extensions/manifest_tests/extension_manifest_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698