Skip to content

Commit

Permalink
Require that platform apps use manifest_version 2.
Browse files Browse the repository at this point in the history
R=asargent@chromium.org


Review URL: http://codereview.chromium.org/10012028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131217 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mihaip@chromium.org committed Apr 7, 2012
1 parent 68dcb1f commit 7bfc592
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chrome/common/extensions/api/_manifest_features.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@
]
},
"platform_app": {
"extension_types": ["platform_app"]
"extension_types": ["platform_app"],
"min_manifest_version": 2
},
"plugins": {
"extension_types": ["extension", "packaged_app", "hosted_app"]
Expand Down
5 changes: 5 additions & 0 deletions chrome/common/extensions/extension_manifests_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ TEST_F(ExtensionManifestTest, PlatformApps) {
CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnablePlatformApps);

LoadAndExpectSuccess("init_valid_platform_app.json");

LoadAndExpectError(
"init_invalid_platform_app_3.json",
"Feature 'platform_app' is not accessible. "
"Requires manifest version of at least 2.");
}

TEST_F(ExtensionManifestTest, CertainApisRequirePlatformApps) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "Platform Test",
"platform_app": true,
"version": "1"
// "manifest_version": 2 is required
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "test",
"version": "1",
"platform_app": true,
"manifest_version": 2,
"app": {
"launch": {
"container": "shell",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "interesting app",
"version": "1",
"platform_app": true,
"manifest_version": 2,
"app": {
"launch": {
"container": "tab",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "test",
"version": "1",
"platform_app": true,
"manifest_version": 2,
"app": {
"launch": {
"container": "shell",
Expand Down

0 comments on commit 7bfc592

Please sign in to comment.