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

Unified Diff: chrome/common/extensions/features/feature_unittest.cc

Issue 10826199: Properly propagate the current Chrome channel into the Feature system on the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make the default stable 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/features/feature_unittest.cc
diff --git a/chrome/common/extensions/features/feature_unittest.cc b/chrome/common/extensions/features/feature_unittest.cc
index 77fe6f4c4cdb433121fefd1c6d5f54fc66c279d4..417d5ed8820752cd6b76a05c181883b89fbcf2b1 100644
--- a/chrome/common/extensions/features/feature_unittest.cc
+++ b/chrome/common/extensions/features/feature_unittest.cc
@@ -454,8 +454,7 @@ TEST(ExtensionFeatureTest, Equals) {
Feature::Availability IsAvailableInChannel(
const std::string& channel, VersionInfo::Channel channel_for_testing) {
- Feature::SetChannelCheckingEnabled(true);
- Feature::SetChannelForTesting(channel_for_testing);
+ Feature::ScopedCurrentChannel current_channel(channel_for_testing);
Feature feature;
if (!channel.empty()) {
@@ -464,15 +463,11 @@ Feature::Availability IsAvailableInChannel(
feature.Parse(&feature_value);
}
- Feature::Availability availability = feature.IsAvailableToManifest(
+ return feature.IsAvailableToManifest(
"random-extension",
Extension::TYPE_UNKNOWN,
Feature::UNSPECIFIED_LOCATION,
-1);
-
- Feature::ResetChannelForTesting();
- Feature::ResetChannelCheckingEnabled();
- return availability;
}
TEST(ExtensionFeatureTest, SupportedChannel) {

Powered by Google App Engine
This is Rietveld 408576698