Commit 305162ce authored by aa@chromium.org's avatar aa@chromium.org

Remove launch.container='window'.

BUG=49241

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56934 0039d316-1c4b-4281-b951-d872f2087c98
parent 443d39bb
...@@ -669,8 +669,6 @@ bool Extension::LoadLaunchContainer(const DictionaryValue* manifest, ...@@ -669,8 +669,6 @@ bool Extension::LoadLaunchContainer(const DictionaryValue* manifest,
launch_container_ = LAUNCH_PANEL; launch_container_ = LAUNCH_PANEL;
} else if (launch_container_string == values::kLaunchContainerTab) { } else if (launch_container_string == values::kLaunchContainerTab) {
launch_container_ = LAUNCH_TAB; launch_container_ = LAUNCH_TAB;
} else if (launch_container_string == values::kLaunchContainerWindow) {
launch_container_ = LAUNCH_WINDOW;
} else { } else {
*error = errors::kInvalidLaunchContainer; *error = errors::kInvalidLaunchContainer;
return false; return false;
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
namespace errors = extension_manifest_errors; namespace errors = extension_manifest_errors;
class ManifestTest : public testing::Test { class ExtensionManifestTest : public testing::Test {
public: public:
ManifestTest() : enable_apps_(true) {} ExtensionManifestTest() : enable_apps_(true) {}
protected: protected:
Extension* LoadExtension(const std::string& name, Extension* LoadExtension(const std::string& name,
...@@ -76,7 +76,7 @@ class ManifestTest : public testing::Test { ...@@ -76,7 +76,7 @@ class ManifestTest : public testing::Test {
bool enable_apps_; bool enable_apps_;
}; };
TEST_F(ManifestTest, AppsDisabledByDefault) { TEST_F(ExtensionManifestTest, AppsDisabledByDefault) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
// On ChromeOS, apps are enabled by default. // On ChromeOS, apps are enabled by default.
if (Extension::AppsAreEnabled()) if (Extension::AppsAreEnabled())
...@@ -87,19 +87,19 @@ TEST_F(ManifestTest, AppsDisabledByDefault) { ...@@ -87,19 +87,19 @@ TEST_F(ManifestTest, AppsDisabledByDefault) {
LoadAndExpectError("launch_local_path.json", errors::kAppsNotEnabled); LoadAndExpectError("launch_local_path.json", errors::kAppsNotEnabled);
} }
TEST_F(ManifestTest, ValidApp) { TEST_F(ExtensionManifestTest, ValidApp) {
scoped_ptr<Extension> extension(LoadAndExpectSuccess("valid_app.json")); scoped_ptr<Extension> extension(LoadAndExpectSuccess("valid_app.json"));
ASSERT_EQ(2u, extension->web_extent().patterns().size()); ASSERT_EQ(2u, extension->web_extent().patterns().size());
EXPECT_EQ("http://www.google.com/mail/*", EXPECT_EQ("http://www.google.com/mail/*",
extension->web_extent().patterns()[0].GetAsString()); extension->web_extent().patterns()[0].GetAsString());
EXPECT_EQ("http://www.google.com/foobar/*", EXPECT_EQ("http://www.google.com/foobar/*",
extension->web_extent().patterns()[1].GetAsString()); extension->web_extent().patterns()[1].GetAsString());
EXPECT_EQ(Extension::LAUNCH_WINDOW, extension->launch_container()); EXPECT_EQ(Extension::LAUNCH_TAB, extension->launch_container());
EXPECT_EQ(false, extension->launch_fullscreen()); EXPECT_EQ(false, extension->launch_fullscreen());
EXPECT_EQ("http://www.google.com/mail/", extension->launch_web_url()); EXPECT_EQ("http://www.google.com/mail/", extension->launch_web_url());
} }
TEST_F(ManifestTest, AppWebUrls) { TEST_F(ExtensionManifestTest, AppWebUrls) {
LoadAndExpectError("web_urls_wrong_type.json", LoadAndExpectError("web_urls_wrong_type.json",
errors::kInvalidWebURLs); errors::kInvalidWebURLs);
LoadAndExpectError("web_urls_invalid_1.json", LoadAndExpectError("web_urls_invalid_1.json",
...@@ -119,7 +119,7 @@ TEST_F(ManifestTest, AppWebUrls) { ...@@ -119,7 +119,7 @@ TEST_F(ManifestTest, AppWebUrls) {
extension->web_extent().patterns()[0].GetAsString()); extension->web_extent().patterns()[0].GetAsString());
} }
TEST_F(ManifestTest, AppBrowseUrls) { TEST_F(ExtensionManifestTest, AppBrowseUrls) {
LoadAndExpectError("browse_urls_wrong_type.json", LoadAndExpectError("browse_urls_wrong_type.json",
errors::kInvalidBrowseURLs); errors::kInvalidBrowseURLs);
LoadAndExpectError("browse_urls_invalid_1.json", LoadAndExpectError("browse_urls_invalid_1.json",
...@@ -143,15 +143,12 @@ TEST_F(ManifestTest, AppBrowseUrls) { ...@@ -143,15 +143,12 @@ TEST_F(ManifestTest, AppBrowseUrls) {
extension->browse_extent().patterns()[0].GetAsString()); extension->browse_extent().patterns()[0].GetAsString());
} }
TEST_F(ManifestTest, AppLaunchContainer) { TEST_F(ExtensionManifestTest, AppLaunchContainer) {
scoped_ptr<Extension> extension; scoped_ptr<Extension> extension;
extension.reset(LoadAndExpectSuccess("launch_tab.json")); extension.reset(LoadAndExpectSuccess("launch_tab.json"));
EXPECT_EQ(Extension::LAUNCH_TAB, extension->launch_container()); EXPECT_EQ(Extension::LAUNCH_TAB, extension->launch_container());
extension.reset(LoadAndExpectSuccess("launch_window.json"));
EXPECT_EQ(Extension::LAUNCH_WINDOW, extension->launch_container());
extension.reset(LoadAndExpectSuccess("launch_panel.json")); extension.reset(LoadAndExpectSuccess("launch_panel.json"));
EXPECT_EQ(Extension::LAUNCH_PANEL, extension->launch_container()); EXPECT_EQ(Extension::LAUNCH_PANEL, extension->launch_container());
...@@ -167,6 +164,8 @@ TEST_F(ManifestTest, AppLaunchContainer) { ...@@ -167,6 +164,8 @@ TEST_F(ManifestTest, AppLaunchContainer) {
extension.reset(LoadAndExpectSuccess("launch_height.json")); extension.reset(LoadAndExpectSuccess("launch_height.json"));
EXPECT_EQ(480, extension->launch_height()); EXPECT_EQ(480, extension->launch_height());
LoadAndExpectError("launch_window.json",
errors::kInvalidLaunchContainer);
LoadAndExpectError("launch_container_invalid_type.json", LoadAndExpectError("launch_container_invalid_type.json",
errors::kInvalidLaunchContainer); errors::kInvalidLaunchContainer);
LoadAndExpectError("launch_container_invalid_value.json", LoadAndExpectError("launch_container_invalid_value.json",
...@@ -185,7 +184,7 @@ TEST_F(ManifestTest, AppLaunchContainer) { ...@@ -185,7 +184,7 @@ TEST_F(ManifestTest, AppLaunchContainer) {
errors::kInvalidLaunchHeight); errors::kInvalidLaunchHeight);
} }
TEST_F(ManifestTest, AppLaunchURL) { TEST_F(ExtensionManifestTest, AppLaunchURL) {
LoadAndExpectError("launch_path_and_url.json", LoadAndExpectError("launch_path_and_url.json",
errors::kLaunchPathAndURLAreExclusive); errors::kLaunchPathAndURLAreExclusive);
LoadAndExpectError("launch_path_invalid_type.json", LoadAndExpectError("launch_path_invalid_type.json",
...@@ -208,7 +207,7 @@ TEST_F(ManifestTest, AppLaunchURL) { ...@@ -208,7 +207,7 @@ TEST_F(ManifestTest, AppLaunchURL) {
extension->GetFullLaunchURL()); extension->GetFullLaunchURL());
} }
TEST_F(ManifestTest, Override) { TEST_F(ExtensionManifestTest, Override) {
LoadAndExpectError("override_newtab_and_history.json", LoadAndExpectError("override_newtab_and_history.json",
errors::kMultipleOverrides); errors::kMultipleOverrides);
LoadAndExpectError("override_invalid_page.json", LoadAndExpectError("override_invalid_page.json",
...@@ -225,12 +224,12 @@ TEST_F(ManifestTest, Override) { ...@@ -225,12 +224,12 @@ TEST_F(ManifestTest, Override) {
extension->GetChromeURLOverrides().find("history")->second.spec()); extension->GetChromeURLOverrides().find("history")->second.spec());
} }
TEST_F(ManifestTest, ChromeURLPermissionInvalid) { TEST_F(ExtensionManifestTest, ChromeURLPermissionInvalid) {
LoadAndExpectError("permission_chrome_url_invalid.json", LoadAndExpectError("permission_chrome_url_invalid.json",
errors::kInvalidPermissionScheme); errors::kInvalidPermissionScheme);
} }
TEST_F(ManifestTest, ChromeResourcesPermissionValidOnlyForComponents) { TEST_F(ExtensionManifestTest, ChromeResourcesPermissionValidOnlyForComponents) {
LoadAndExpectError("permission_chrome_resources_url.json", LoadAndExpectError("permission_chrome_resources_url.json",
errors::kInvalidPermissionScheme); errors::kInvalidPermissionScheme);
std::string error; std::string error;
...@@ -242,12 +241,12 @@ TEST_F(ManifestTest, ChromeResourcesPermissionValidOnlyForComponents) { ...@@ -242,12 +241,12 @@ TEST_F(ManifestTest, ChromeResourcesPermissionValidOnlyForComponents) {
EXPECT_EQ("", error); EXPECT_EQ("", error);
} }
TEST_F(ManifestTest, ChromeURLContentScriptInvalid) { TEST_F(ExtensionManifestTest, ChromeURLContentScriptInvalid) {
LoadAndExpectError("content_script_chrome_url_invalid.json", LoadAndExpectError("content_script_chrome_url_invalid.json",
errors::kInvalidMatch); errors::kInvalidMatch);
} }
TEST_F(ManifestTest, DevToolsExtensions) { TEST_F(ExtensionManifestTest, DevToolsExtensions) {
LoadAndExpectError("devtools_extension_no_permissions.json", LoadAndExpectError("devtools_extension_no_permissions.json",
errors::kDevToolsExperimental); errors::kDevToolsExperimental);
LoadAndExpectError("devtools_extension_url_invalid_type.json", LoadAndExpectError("devtools_extension_url_invalid_type.json",
...@@ -264,7 +263,7 @@ TEST_F(ManifestTest, DevToolsExtensions) { ...@@ -264,7 +263,7 @@ TEST_F(ManifestTest, DevToolsExtensions) {
*CommandLine::ForCurrentProcess() = old_command_line; *CommandLine::ForCurrentProcess() = old_command_line;
} }
TEST_F(ManifestTest, DisallowHybridApps) { TEST_F(ExtensionManifestTest, DisallowHybridApps) {
LoadAndExpectError("disallow_hybrid_1.json", LoadAndExpectError("disallow_hybrid_1.json",
errors::kHostedAppsCannotIncludeExtensionFeatures); errors::kHostedAppsCannotIncludeExtensionFeatures);
LoadAndExpectError("disallow_hybrid_2.json", LoadAndExpectError("disallow_hybrid_2.json",
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window",
"web_url": "http://www.google.com/mail/" "web_url": "http://www.google.com/mail/"
} }
}, },
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window",
"web_url": "http://www.google.com/mail/" "web_url": "http://www.google.com/mail/"
}, },
"browse_urls": [ "browse_urls": [
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"http://www.google.com/foobar/" "http://www.google.com/foobar/"
], ],
"launch": { "launch": {
"container": "window",
"web_url": "http://www.google.com/mail/" "web_url": "http://www.google.com/mail/"
} }
}, },
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"http://www.google.com/foobar/" "http://www.google.com/foobar/"
], ],
"launch": { "launch": {
"container": "window",
"web_url": "http://www.google.com/mail/" "web_url": "http://www.google.com/mail/"
} }
}, },
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window",
"fullscreen": true, "fullscreen": true,
"local_path": "bar.html" "local_path": "bar.html"
} }
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window",
"fullscreen": "true", "fullscreen": "true",
"local_path": "bar.html" "local_path": "bar.html"
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window", "container": "panel",
"height": 480, "height": 480,
"local_path": "bar.html" "local_path": "bar.html"
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window", "container": "panel",
"height": -1, "height": -1,
"local_path": "bar.html" "local_path": "bar.html"
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window", "container": "panel",
"width": 640, "width": 640,
"local_path": "bar.html" "local_path": "bar.html"
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window", "container": "panel",
"width": -1, "width": -1,
"local_path": "bar.html" "local_path": "bar.html"
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"http://www.google.com/foobar/" "http://www.google.com/foobar/"
], ],
"launch": { "launch": {
"container": "window",
"web_url": "http://www.google.com/mail/" "web_url": "http://www.google.com/mail/"
} }
}, },
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"version": "1", "version": "1",
"app": { "app": {
"launch": { "launch": {
"container": "window",
"web_url": "http://www.google.com/mail/" "web_url": "http://www.google.com/mail/"
} }
}, },
......
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