Commit 8e95d2d4 authored by miket@chromium.org's avatar miket@chromium.org

Put test that is dependent on switch in its own TEST_F().

BUG=lint from review 8561031
TEST=none; this is a refactoring of existing unit tests.


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113318 0039d316-1c4b-4281-b951-d872f2087c98
parent 31dbf9db
...@@ -380,7 +380,6 @@ TEST_F(ExtensionManifestTest, AppWebUrls) { ...@@ -380,7 +380,6 @@ TEST_F(ExtensionManifestTest, AppWebUrls) {
TEST_F(ExtensionManifestTest, AppLaunchContainer) { TEST_F(ExtensionManifestTest, AppLaunchContainer) {
scoped_refptr<Extension> extension; scoped_refptr<Extension> extension;
CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnablePlatformApps);
extension = LoadAndExpectSuccess("launch_tab.json"); extension = LoadAndExpectSuccess("launch_tab.json");
EXPECT_EQ(extension_misc::LAUNCH_TAB, extension->launch_container()); EXPECT_EQ(extension_misc::LAUNCH_TAB, extension->launch_container());
...@@ -401,8 +400,6 @@ TEST_F(ExtensionManifestTest, AppLaunchContainer) { ...@@ -401,8 +400,6 @@ TEST_F(ExtensionManifestTest, AppLaunchContainer) {
errors::kInvalidLaunchContainer); errors::kInvalidLaunchContainer);
LoadAndExpectError("launch_container_invalid_type.json", LoadAndExpectError("launch_container_invalid_type.json",
errors::kInvalidLaunchContainer); errors::kInvalidLaunchContainer);
LoadAndExpectError("launch_container_invalid_type_for_platform.json",
errors::kInvalidLaunchContainerForPlatform);
LoadAndExpectError("launch_container_invalid_value.json", LoadAndExpectError("launch_container_invalid_value.json",
errors::kInvalidLaunchContainer); errors::kInvalidLaunchContainer);
LoadAndExpectError("launch_container_without_launch_url.json", LoadAndExpectError("launch_container_without_launch_url.json",
...@@ -417,6 +414,13 @@ TEST_F(ExtensionManifestTest, AppLaunchContainer) { ...@@ -417,6 +414,13 @@ TEST_F(ExtensionManifestTest, AppLaunchContainer) {
errors::kInvalidLaunchHeight); errors::kInvalidLaunchHeight);
} }
TEST_F(ExtensionManifestTest, PlatformAppLaunchContainer) {
CommandLine::ForCurrentProcess()->AppendSwitch(switches::kEnablePlatformApps);
LoadAndExpectError("launch_container_invalid_type_for_platform.json",
errors::kInvalidLaunchContainerForPlatform);
}
TEST_F(ExtensionManifestTest, AppLaunchURL) { TEST_F(ExtensionManifestTest, AppLaunchURL) {
LoadAndExpectError("launch_path_and_url.json", LoadAndExpectError("launch_path_and_url.json",
errors::kLaunchPathAndURLAreExclusive); errors::kLaunchPathAndURLAreExclusive);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment