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

Unified Diff: chrome/common/extensions/api/extension_api_unittest.cc

Issue 11316164: Implement ComplexFeature to support permission features with multiple rules. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new Created 8 years 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/api/extension_api_unittest.cc
diff --git a/chrome/common/extensions/api/extension_api_unittest.cc b/chrome/common/extensions/api/extension_api_unittest.cc
index 7d14560b4b636788d02043133d55064f6bc6eceb..fccc2add49e4df3f3561a62fd5f65920ba6bb773 100644
--- a/chrome/common/extensions/api/extension_api_unittest.cc
+++ b/chrome/common/extensions/api/extension_api_unittest.cc
@@ -18,6 +18,8 @@
#include "chrome/common/extensions/extension.h"
#include "testing/gtest/include/gtest/gtest.h"
+using extensions::Feature;
not at google - send to devlin 2012/12/12 17:42:41 this file is in the extensions namespace, this sho
justinlin 2012/12/14 12:26:26 Done.
+
namespace extensions {
namespace {
@@ -27,8 +29,8 @@ class TestFeatureProvider : public FeatureProvider {
: context_(context) {
}
- virtual Feature* GetFeature(const std::string& name) OVERRIDE {
- Feature* result = new Feature();
+ virtual SimpleFeature* GetFeature(const std::string& name) OVERRIDE {
not at google - send to devlin 2012/12/12 17:42:41 Feature etc
justinlin 2012/12/14 12:26:26 I changed the method signature, but I think the ot
+ SimpleFeature* result = new SimpleFeature();
result->set_name(name);
result->extension_types()->insert(Extension::TYPE_EXTENSION);
result->contexts()->insert(context_);
@@ -352,11 +354,11 @@ TEST(ExtensionAPI, GetAPINameFromFullName) {
TEST(ExtensionAPI, DefaultConfigurationFeatures) {
scoped_ptr<ExtensionAPI> api(ExtensionAPI::CreateWithDefaultConfiguration());
- Feature* bookmarks = api->GetFeature("bookmarks");
- Feature* bookmarks_create = api->GetFeature("bookmarks.create");
+ SimpleFeature* bookmarks = api->GetFeature("bookmarks");
+ SimpleFeature* bookmarks_create = api->GetFeature("bookmarks.create");
struct {
- Feature* feature;
+ SimpleFeature* feature;
// TODO(aa): More stuff to test over time.
} test_data[] = {
{ bookmarks },
@@ -364,7 +366,7 @@ TEST(ExtensionAPI, DefaultConfigurationFeatures) {
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_data); ++i) {
- Feature* feature = test_data[i].feature;
+ SimpleFeature* feature = test_data[i].feature;
ASSERT_TRUE(feature) << i;
EXPECT_TRUE(feature->whitelist()->empty());

Powered by Google App Engine
This is Rietveld 408576698