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

Side by Side Diff: chrome/common/extensions/features/simple_feature_unittest.cc

Issue 23691012: Renamed packaged_app to legacy_packaged_app in extension feature files. It's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tostring message Created 7 years, 3 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
« no previous file with comments | « chrome/common/extensions/features/simple_feature.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/common/extensions/features/simple_feature.h" 5 #include "chrome/common/extensions/features/simple_feature.h"
6 6
7 #include "chrome/common/extensions/features/feature_channel.h" 7 #include "chrome/common/extensions/features/feature_channel.h"
8 #include "chrome/common/extensions/value_builder.h" 8 #include "chrome/common/extensions/value_builder.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 EXPECT_EQ(2u, feature->whitelist()->size()); 369 EXPECT_EQ(2u, feature->whitelist()->size());
370 EXPECT_TRUE(feature->whitelist()->count("foo")); 370 EXPECT_TRUE(feature->whitelist()->count("foo"));
371 EXPECT_TRUE(feature->whitelist()->count("bar")); 371 EXPECT_TRUE(feature->whitelist()->count("bar"));
372 } 372 }
373 373
374 TEST_F(ExtensionSimpleFeatureTest, ParsePackageTypes) { 374 TEST_F(ExtensionSimpleFeatureTest, ParsePackageTypes) {
375 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 375 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue());
376 base::ListValue* extension_types = new base::ListValue(); 376 base::ListValue* extension_types = new base::ListValue();
377 extension_types->Append(new base::StringValue("extension")); 377 extension_types->Append(new base::StringValue("extension"));
378 extension_types->Append(new base::StringValue("theme")); 378 extension_types->Append(new base::StringValue("theme"));
379 extension_types->Append(new base::StringValue("packaged_app")); 379 extension_types->Append(new base::StringValue("legacy_packaged_app"));
380 extension_types->Append(new base::StringValue("hosted_app")); 380 extension_types->Append(new base::StringValue("hosted_app"));
381 extension_types->Append(new base::StringValue("platform_app")); 381 extension_types->Append(new base::StringValue("platform_app"));
382 extension_types->Append(new base::StringValue("shared_module")); 382 extension_types->Append(new base::StringValue("shared_module"));
383 value->Set("extension_types", extension_types); 383 value->Set("extension_types", extension_types);
384 scoped_ptr<SimpleFeature> feature(new SimpleFeature()); 384 scoped_ptr<SimpleFeature> feature(new SimpleFeature());
385 feature->Parse(value.get()); 385 feature->Parse(value.get());
386 EXPECT_EQ(6u, feature->extension_types()->size()); 386 EXPECT_EQ(6u, feature->extension_types()->size());
387 EXPECT_TRUE(feature->extension_types()->count(Manifest::TYPE_EXTENSION)); 387 EXPECT_TRUE(feature->extension_types()->count(Manifest::TYPE_EXTENSION));
388 EXPECT_TRUE(feature->extension_types()->count(Manifest::TYPE_THEME)); 388 EXPECT_TRUE(feature->extension_types()->count(Manifest::TYPE_THEME));
389 EXPECT_TRUE(feature->extension_types()->count( 389 EXPECT_TRUE(feature->extension_types()->count(
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_CANARY)); 609 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_CANARY));
610 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, 610 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
611 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_DEV)); 611 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_DEV));
612 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, 612 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
613 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_BETA)); 613 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_BETA));
614 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, 614 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
615 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_STABLE)); 615 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_STABLE));
616 } 616 }
617 617
618 } // namespace 618 } // namespace
OLDNEW
« no previous file with comments | « chrome/common/extensions/features/simple_feature.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698