Commit 271c61cb authored by phoglund@chromium.org's avatar phoglund@chromium.org

Revert 276368 "[Mac] Add interactive App Shim test."

The Launch test failed on mac 10.7 tests:
http://build.chromium.org/p/chromium.mac/builders/Mac%2010.7%20Tests%20%28dbg%29%283%29/builds/24632.

> [Mac] Add interactive App Shim test.
> 
> This test creates shims in the user data dir and actually starts them up and
> expects them to connect to the IPC socket.
> 
> BUG=168080
> 
> Review URL: https://codereview.chromium.org/316493002

TBR=jackhou@chromium.org

Review URL: https://codereview.chromium.org/325123004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276385 0039d316-1c4b-4281-b951-d872f2087c98
parent 10bc022d
This diff is collapsed.
...@@ -611,11 +611,7 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) { ...@@ -611,11 +611,7 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
main_message_loop.set_thread_name("MainThread"); main_message_loop.set_thread_name("MainThread");
base::PlatformThread::SetName("CrAppShimMain"); base::PlatformThread::SetName("CrAppShimMain");
// In tests, launching Chrome does nothing, and we won't get a ping response, if (pid == -1) {
// so just assume the socket exists.
if (pid == -1 &&
!CommandLine::ForCurrentProcess()->HasSwitch(
app_mode::kLaunchedForTest)) {
// Launch Chrome if it isn't already running. // Launch Chrome if it isn't already running.
ProcessSerialNumber psn; ProcessSerialNumber psn;
CommandLine command_line(CommandLine::NO_PROGRAM); CommandLine command_line(CommandLine::NO_PROGRAM);
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
#include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app.h"
#include "extensions/common/manifest_handlers/file_handler_info.h" #include "extensions/common/manifest_handlers/file_handler_info.h"
// Whether to enable update and launch of app shims in tests. (Normally shims
// are never created or launched in tests). Note that update only creates
// internal shim bundles, i.e. it does not create new shims in ~/Applications.
extern bool g_app_shims_allow_update_and_launch_in_tests;
namespace web_app { namespace web_app {
// Returns the full path of the .app shim that would be created by // Returns the full path of the .app shim that would be created by
......
...@@ -47,8 +47,6 @@ ...@@ -47,8 +47,6 @@
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_family.h" #include "ui/gfx/image/image_family.h"
bool g_app_shims_allow_update_and_launch_in_tests = false;
namespace { namespace {
// Launch Services Key to run as an agent app, which doesn't launch in the dock. // Launch Services Key to run as an agent app, which doesn't launch in the dock.
...@@ -859,10 +857,8 @@ base::FilePath GetAppInstallPath(const ShortcutInfo& shortcut_info) { ...@@ -859,10 +857,8 @@ base::FilePath GetAppInstallPath(const ShortcutInfo& shortcut_info) {
} }
void MaybeLaunchShortcut(const ShortcutInfo& shortcut_info) { void MaybeLaunchShortcut(const ShortcutInfo& shortcut_info) {
if (AppShimsDisabledForTest() && if (AppShimsDisabledForTest())
!g_app_shims_allow_update_and_launch_in_tests) {
return; return;
}
content::BrowserThread::PostTask( content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE, content::BrowserThread::FILE, FROM_HERE,
...@@ -974,10 +970,8 @@ void UpdatePlatformShortcuts( ...@@ -974,10 +970,8 @@ void UpdatePlatformShortcuts(
const ShortcutInfo& shortcut_info, const ShortcutInfo& shortcut_info,
const extensions::FileHandlersInfo& file_handlers_info) { const extensions::FileHandlersInfo& file_handlers_info) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
if (AppShimsDisabledForTest() && if (AppShimsDisabledForTest())
!g_app_shims_allow_update_and_launch_in_tests) {
return; return;
}
WebAppShortcutCreator shortcut_creator( WebAppShortcutCreator shortcut_creator(
app_data_path, shortcut_info, file_handlers_info); app_data_path, shortcut_info, file_handlers_info);
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
'HAS_OUT_OF_PROC_TEST_RUNNER', 'HAS_OUT_OF_PROC_TEST_RUNNER',
], ],
'sources': [ 'sources': [
'../apps/app_shim/app_shim_interactive_uitest_mac.mm',
'../apps/app_shim/app_shim_quit_interactive_uitest_mac.mm', '../apps/app_shim/app_shim_quit_interactive_uitest_mac.mm',
'../apps/app_window_interactive_uitest.cc', '../apps/app_window_interactive_uitest.cc',
'../ui/base/clipboard/clipboard_unittest.cc', '../ui/base/clipboard/clipboard_unittest.cc',
......
...@@ -37,10 +37,6 @@ extern const char kAppListModeId[]; ...@@ -37,10 +37,6 @@ extern const char kAppListModeId[];
// launch_now = false. This associates the shim without launching the app. // launch_now = false. This associates the shim without launching the app.
extern const char kLaunchedByChromeProcessId[]; extern const char kLaunchedByChromeProcessId[];
// Indicates to the shim that it was launched for a test, so don't attempt to
// launch Chrome.
extern const char kLaunchedForTest[];
// Path to an app shim bundle. Indicates to Chrome that this shim attempted to // Path to an app shim bundle. Indicates to Chrome that this shim attempted to
// launch but failed. // launch but failed.
extern const char kAppShimError[]; extern const char kAppShimError[];
......
...@@ -14,7 +14,6 @@ const char kAppShimSocketSymlinkName[] = "App Shim Socket"; ...@@ -14,7 +14,6 @@ const char kAppShimSocketSymlinkName[] = "App Shim Socket";
const char kAppListModeId[] = "app_list"; const char kAppListModeId[] = "app_list";
const char kLaunchedByChromeProcessId[] = "launched-by-chrome-process-id"; const char kLaunchedByChromeProcessId[] = "launched-by-chrome-process-id";
const char kLaunchedForTest[] = "launched-for-test";
const char kAppShimError[] = "app-shim-error"; const char kAppShimError[] = "app-shim-error";
......
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