diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 14:09:37 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 14:09:37 +0000 |
commit | bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9 (patch) | |
tree | ee15898939e4989b96c6419217696f63d7a5585b /chrome_frame/test/proxy_factory_mock.h | |
parent | e721ebe885b159f9b18047392be9a0f5834998fb (diff) | |
download | chromium_src-bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9.zip chromium_src-bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9.tar.gz chromium_src-bbfa9a15797ba107dcae0f7fff85a7f12ffd26b9.tar.bz2 |
Handle automation server crashes. When Chrome crashes, we now handle the case and support document refresh or reload.
When chrome crashes, we draw a poor man's sad tab (":-("), so that can clearly be improved.
Another thing is that if the chrome instance that crashed held several navigational entries, then that history is lost.
TEST=There are a couple of tests included, so run those (*TabCrash*) and also verify that when the chrome automation server is killed that we do the right thing. Also check info in bug report.
BUG=25839
Review URL: http://codereview.chromium.org/3061036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/proxy_factory_mock.h')
-rw-r--r-- | chrome_frame/test/proxy_factory_mock.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/chrome_frame/test/proxy_factory_mock.h b/chrome_frame/test/proxy_factory_mock.h index 8f2bb2e..609d4b6 100644 --- a/chrome_frame/test/proxy_factory_mock.h +++ b/chrome_frame/test/proxy_factory_mock.h @@ -1,8 +1,8 @@ // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_FRAME_PROXY_FACTORY_MOCK_H_ -#define CHROME_FRAME_PROXY_FACTORY_MOCK_H_ +#ifndef CHROME_FRAME_TEST_PROXY_FACTORY_MOCK_H_ +#define CHROME_FRAME_TEST_PROXY_FACTORY_MOCK_H_ #include <windows.h> #include <string> @@ -10,16 +10,20 @@ #include "gmock/gmock.h" #include "chrome_frame/chrome_frame_automation.h" -struct LaunchDelegateMock : public ProxyFactory::LaunchDelegate { +struct LaunchDelegateMock : public LaunchDelegate { MOCK_METHOD2(LaunchComplete, void(ChromeFrameAutomationProxy*, - AutomationLaunchResult)); + AutomationLaunchResult)); + MOCK_METHOD0(AutomationServerDied, void()); }; class MockProxyFactory : public ProxyFactory { public: - MOCK_METHOD3(GetAutomationServer, void (ProxyFactory::LaunchDelegate*, - const ChromeFrameLaunchParams& params, void** automation_server_id)); - MOCK_METHOD1(ReleaseAutomationServer, bool(void* id)); + MOCK_METHOD3(GetAutomationServer, + void (LaunchDelegate*, // NOLINT + ChromeFrameLaunchParams* params, + void** automation_server_id)); + MOCK_METHOD2(ReleaseAutomationServer, bool(void* server_id, + LaunchDelegate* delegate)); MockProxyFactory() : thread_("mock factory worker") { thread_.Start(); @@ -31,7 +35,7 @@ class MockProxyFactory : public ProxyFactory { void* proxy_id, AutomationLaunchResult result, LaunchDelegate* d, - const ChromeFrameLaunchParams& params, + ChromeFrameLaunchParams* params, void** automation_server_id); base::Thread thread_; @@ -39,5 +43,5 @@ class MockProxyFactory : public ProxyFactory { }; -#endif // CHROME_FRAME_PROXY_FACTORY_MOCK_H_ +#endif // CHROME_FRAME_TEST_PROXY_FACTORY_MOCK_H_ |