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

Unified Diff: extensions/common/features/complex_feature_unittest.cc

Issue 414633002: Remove service worker concepts from _api_features.json (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « extensions/common/features/complex_feature.cc ('k') | extensions/common/features/feature.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/features/complex_feature_unittest.cc
diff --git a/extensions/common/features/complex_feature_unittest.cc b/extensions/common/features/complex_feature_unittest.cc
index bef056d92fa319bf5d0723403cd7ae24a4450730..54e5286342d101e42a71dba0528d1ab1304d5122 100644
--- a/extensions/common/features/complex_feature_unittest.cc
+++ b/extensions/common/features/complex_feature_unittest.cc
@@ -6,14 +6,11 @@
#include "chrome/common/extensions/features/chrome_channel_feature_filter.h"
#include "chrome/common/extensions/features/feature_channel.h"
-#include "extensions/common/features/api_feature.h"
#include "extensions/common/features/simple_feature.h"
-#include "extensions/common/test_util.h"
#include "extensions/common/value_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
using chrome::VersionInfo;
-using extensions::APIFeature;
using extensions::ComplexFeature;
using extensions::DictionaryBuilder;
using extensions::Feature;
@@ -21,7 +18,6 @@ using extensions::ListBuilder;
using extensions::Manifest;
using extensions::ScopedCurrentChannel;
using extensions::SimpleFeature;
-using extensions::test_util::ParseJsonDictionaryWithSingleQuotes;
namespace {
@@ -165,56 +161,6 @@ TEST_F(ExtensionComplexFeatureTest, MultipleRulesChannels) {
}
}
-// Tests a complex feature with blocked_in_service_worker returns true for
-// IsBlockedInServiceWorker().
-TEST_F(ExtensionComplexFeatureTest, BlockedInServiceWorker) {
- scoped_ptr<ComplexFeature::FeatureList> features(
- new ComplexFeature::FeatureList());
-
- // Two feature rules, both with blocked_in_service_worker: true.
- scoped_ptr<SimpleFeature> api_feature(new APIFeature());
- api_feature->Parse(ParseJsonDictionaryWithSingleQuotes(
- "{"
- " 'channel': 'trunk',"
- " 'blocked_in_service_worker': true"
- "}").get());
- features->push_back(api_feature.release());
-
- api_feature.reset(new APIFeature());
- api_feature->Parse(ParseJsonDictionaryWithSingleQuotes(
- "{"
- " 'channel': 'stable',"
- " 'blocked_in_service_worker': true"
- "}").get());
- features->push_back(api_feature.release());
-
- EXPECT_TRUE(ComplexFeature(features.Pass()).IsBlockedInServiceWorker());
-}
-
-// Tests a complex feature without blocked_in_service_worker returns false for
-// IsBlockedInServiceWorker().
-TEST_F(ExtensionComplexFeatureTest, NotBlockedInServiceWorker) {
- scoped_ptr<ComplexFeature::FeatureList> features(
- new ComplexFeature::FeatureList());
-
- // Two feature rules without blocked_in_service_worker.
- scoped_ptr<SimpleFeature> api_feature(new APIFeature());
- api_feature->Parse(ParseJsonDictionaryWithSingleQuotes(
- "{"
- " 'channel': 'trunk'"
- "}").get());
- features->push_back(api_feature.release());
-
- api_feature.reset(new APIFeature());
- api_feature->Parse(ParseJsonDictionaryWithSingleQuotes(
- "{"
- " 'channel': 'stable'"
- "}").get());
- features->push_back(api_feature.release());
-
- EXPECT_FALSE(ComplexFeature(features.Pass()).IsBlockedInServiceWorker());
-}
-
// Tests that dependencies are correctly checked.
TEST_F(ExtensionComplexFeatureTest, Dependencies) {
scoped_ptr<ComplexFeature::FeatureList> features(
« no previous file with comments | « extensions/common/features/complex_feature.cc ('k') | extensions/common/features/feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698