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

Unified Diff: chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc

Issue 10544059: Change the platform app manifest structure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update for getDisplayPath, implement restrictions via _manifest_features.json Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
index ab7a8525804eadc1f05871a09551f7c2d6a31b31..2805077344acdcd5d92b813d02cee4576ed2a3d9 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
+++ b/chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc
@@ -24,20 +24,35 @@ TEST_F(ExtensionManifestTest, PlatformApps) {
LoadAndExpectSuccess("init_valid_platform_app.json");
EXPECT_TRUE(extension->is_storage_isolated());
- extension = LoadAndExpectSuccess("init_invalid_platform_app_1.json");
- ASSERT_TRUE(extension);
- ASSERT_EQ(1u, extension->install_warnings().size());
- EXPECT_EQ("'app.launch' is not allowed for specified package type "
- "(theme, app, etc.).",
- extension->install_warnings()[0]);
-
- LoadAndExpectError(
- "init_invalid_platform_app_2.json",
- extension_manifest_errors::kBackgroundRequiredForPlatformApps);
-
- LoadAndExpectError(
- "init_invalid_platform_app_3.json",
- extension_manifest_errors::kPlatformAppNeedsManifestVersion2);
+ LoadAndExpectWarning(
+ "init_invalid_platform_app_1.json",
+ "'app.launch' is not allowed for specified package type "
+ "(theme, app, etc.).");
+
+ Testcase error_testcases[] = {
+ Testcase("init_invalid_platform_app_2.json",
+ errors::kBackgroundRequiredForPlatformApps),
+ Testcase("init_invalid_platform_app_3.json",
+ errors::kPlatformAppNeedsManifestVersion2),
+ };
+ RunTestcases(error_testcases, arraysize(error_testcases), EXPECT_TYPE_ERROR);
+
+ Testcase warning_testcases[] = {
+ Testcase(
+ "init_invalid_platform_app_1.json",
+ "'app.launch' is not allowed for specified package type "
+ "(theme, app, etc.)."),
+ Testcase(
+ "init_invalid_platform_app_4.json",
+ "'background' is not allowed for specified package type "
+ "(theme, app, etc.)."),
+ Testcase(
+ "init_invalid_platform_app_5.json",
+ "'background' is not allowed for specified package type "
+ "(theme, app, etc.).")
+ };
+ RunTestcases(
+ warning_testcases, arraysize(warning_testcases), EXPECT_TYPE_WARNING);
}
TEST_F(ExtensionManifestTest, CertainApisRequirePlatformApps) {

Powered by Google App Engine
This is Rietveld 408576698