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

Unified Diff: chrome/common/extensions/extension_manifests_unittest.cc

Issue 9969087: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mike's review feedback Created 8 years, 8 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/extension_manifests_unittest.cc
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 5d3ec718c6d126e104a3f65b371d848a585f736e..7512ee4a0a4859541a92dcda76bad7948f6c836b 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -297,6 +297,13 @@ TEST_F(ExtensionManifestTest, PlatformApps) {
CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnablePlatformApps);
LoadAndExpectSuccess("init_valid_platform_app.json");
+
+ LoadAndExpectError(
+ "init_invalid_platform_app_1.json",
+ extension_manifest_errors::kLaunchNotAllowedForPlatformApps);
+ LoadAndExpectError(
+ "init_invalid_platform_app_2.json",
+ extension_manifest_errors::kBackgroundRequiredForPlatformApps);
}
TEST_F(ExtensionManifestTest, CertainApisRequirePlatformApps) {
@@ -527,39 +534,6 @@ TEST_F(ExtensionManifestTest, AppLaunchContainer) {
ExtensionErrorUtils::FormatErrorMessage(
errors::kInvalidLaunchValue,
keys::kLaunchHeight));
-
- LoadAndExpectError("launch_min_width_invalid.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidLaunchValueContainer,
- keys::kLaunchMinWidth));
- LoadAndExpectError("launch_min_width_negative.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidLaunchValue,
- keys::kLaunchMinWidth));
- LoadAndExpectError("launch_min_height_invalid.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidLaunchValueContainer,
- keys::kLaunchMinHeight));
- LoadAndExpectError("launch_min_height_negative.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidLaunchValue,
- keys::kLaunchMinHeight));
-
- LoadAndExpectError("launch_container_missing_size_for_platform.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidLaunchValue,
- keys::kLaunchWidth));
- LoadAndExpectError("launch_container_invalid_size_constraints.json",
- ExtensionErrorUtils::FormatErrorMessage(
- errors::kInvalidLaunchValue,
- keys::kLaunchMaxWidth));
-}
-
-TEST_F(ExtensionManifestTest, PlatformAppLaunchContainer) {
- CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnablePlatformApps);
-
- LoadAndExpectError("launch_container_invalid_type_for_platform.json",
- errors::kInvalidLaunchContainerForPlatform);
}
TEST_F(ExtensionManifestTest, AppLaunchURL) {
« no previous file with comments | « chrome/common/extensions/extension_manifest_constants.cc ('k') | chrome/test/data/extensions/api_test/dns/api/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698