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

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

Issue 15091002: Lazily load API schemas from resource files and convert all APIs to features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos tests Created 7 years, 6 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 #include "chrome/common/extensions/features/simple_feature.h" 5 #include "chrome/common/extensions/features/simple_feature.h"
6 6
7 #include "chrome/common/extensions/value_builder.h" 7 #include "chrome/common/extensions/value_builder.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 using chrome::VersionInfo; 10 using chrome::VersionInfo;
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 EXPECT_EQ(Feature::IS_AVAILABLE, 604 EXPECT_EQ(Feature::IS_AVAILABLE,
605 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_UNKNOWN)); 605 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_UNKNOWN));
606 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, 606 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
607 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_CANARY)); 607 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_CANARY));
608 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, 608 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
609 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_DEV)); 609 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_DEV));
610 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, 610 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
611 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_BETA)); 611 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_BETA));
612 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL, 612 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
613 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_STABLE)); 613 IsAvailableInChannel("trunk", VersionInfo::CHANNEL_STABLE));
614
615 // Default supported channel (trunk).
616 EXPECT_EQ(Feature::IS_AVAILABLE,
617 IsAvailableInChannel(std::string(), VersionInfo::CHANNEL_UNKNOWN));
618 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
619 IsAvailableInChannel(std::string(), VersionInfo::CHANNEL_CANARY));
620 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
621 IsAvailableInChannel(std::string(), VersionInfo::CHANNEL_DEV));
622 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
623 IsAvailableInChannel(std::string(), VersionInfo::CHANNEL_BETA));
624 EXPECT_EQ(Feature::UNSUPPORTED_CHANNEL,
625 IsAvailableInChannel(std::string(), VersionInfo::CHANNEL_STABLE));
626 } 614 }
627 615
628 } // namespace 616 } // namespace
OLDNEW
« no previous file with comments | « chrome/common/extensions/features/simple_feature.cc ('k') | chrome/common/extensions/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698