summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 18:56:35 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-28 18:56:35 +0000
commit785993e730139a6c5a93b69ca4dfdc313db59895 (patch)
tree5a33a5b01a70bc344f438b84a1023d6ef8f8f12e
parent4d10edeb5f3db4366b4521c2346bfb4741c21e6f (diff)
downloadchromium_src-785993e730139a6c5a93b69ca4dfdc313db59895.zip
chromium_src-785993e730139a6c5a93b69ca4dfdc313db59895.tar.gz
chromium_src-785993e730139a6c5a93b69ca4dfdc313db59895.tar.bz2
Reverting this to see if this fixes ChromeFrame tests. Please reland with the tests fixed.
Revert 64252 - The ChromeFrame objects now provides an unfrozen interface called IChromeFramePrivate. This interface provides a GetSessionId() which returns the ID used by Chrome in its Tab javascript object. Review URL: http://codereview.chromium.org/3541017 TBR=hansl@google.com Review URL: http://codereview.chromium.org/4134008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64287 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/automation/automation_provider.h3
-rw-r--r--chrome/browser/automation/automation_provider_win.cc4
-rw-r--r--chrome/test/automation/automation_messages_internal.h5
-rw-r--r--chrome/test/automation/automation_proxy.cc4
-rw-r--r--chrome_frame/cfproxy.h2
-rw-r--r--chrome_frame/cfproxy_proxy.cc2
-rw-r--r--chrome_frame/cfproxy_support.cc6
-rw-r--r--chrome_frame/cfproxy_test.cc26
-rw-r--r--chrome_frame/chrome_frame_activex_base.h13
-rw-r--r--chrome_frame/chrome_frame_automation.cc10
-rw-r--r--chrome_frame/chrome_frame_automation.h8
-rw-r--r--chrome_frame/chrome_tab.idl12
-rw-r--r--chrome_frame/custom_sync_call_context.h7
-rw-r--r--chrome_frame/external_tab.cc8
-rw-r--r--chrome_frame/external_tab.h5
-rw-r--r--chrome_frame/external_tab_test.cc9
-rw-r--r--chrome_frame/test/automation_client_mock.cc19
17 files changed, 40 insertions, 103 deletions
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index ff3b355..5a29b04 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -357,8 +357,7 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
void CreateExternalTab(const IPC::ExternalTabSettings& settings,
gfx::NativeWindow* tab_container_window,
gfx::NativeWindow* tab_window,
- int* tab_handle,
- int* session_id);
+ int* tab_handle);
void ConnectExternalTab(uint64 cookie,
bool allow,
diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc
index 6420b56..7843c83 100644
--- a/chrome/browser/automation/automation_provider_win.cc
+++ b/chrome/browser/automation/automation_provider_win.cc
@@ -241,13 +241,12 @@ void AutomationProvider::GetTabHWND(int handle, HWND* tab_hwnd) {
void AutomationProvider::CreateExternalTab(
const IPC::ExternalTabSettings& settings,
gfx::NativeWindow* tab_container_window, gfx::NativeWindow* tab_window,
- int* tab_handle, int* session_id) {
+ int* tab_handle) {
TRACE_EVENT_BEGIN("AutomationProvider::CreateExternalTab", 0, "");
*tab_handle = 0;
*tab_container_window = NULL;
*tab_window = NULL;
- *session_id = -1;
scoped_refptr<ExternalTabContainer> external_tab_container =
new ExternalTabContainer(this, automation_resource_message_filter_);
@@ -267,7 +266,6 @@ void AutomationProvider::CreateExternalTab(
*tab_handle = external_tab_container->tab_handle();
*tab_container_window = external_tab_container->GetNativeView();
*tab_window = tab_contents->GetNativeView();
- *session_id = tab_contents->controller().session_id().id();
} else {
external_tab_container->Uninitialize();
}
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index e8fd57f..adadf68 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -428,12 +428,11 @@ IPC_BEGIN_MESSAGES(Automation)
// hosted by an external process.
// Request:
// ExternalTabSettings - settings for external tab
- IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_CreateExternalTab,
+ IPC_SYNC_MESSAGE_ROUTED1_3(AutomationMsg_CreateExternalTab,
IPC::ExternalTabSettings /* settings*/,
gfx::NativeWindow /* Tab container window */,
gfx::NativeWindow /* Tab window */,
- int /* Handle to the new tab */,
- int /* Session Id of the new tab */)
+ int /* Handle to the new tab */)
// This message notifies the AutomationProvider to navigate to a specified
// url in the external tab with given handle. The first parameter is the
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 748ffc2..3f6eb64 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -487,13 +487,11 @@ scoped_refptr<TabProxy> AutomationProxy::CreateExternalTab(
gfx::NativeWindow* external_tab_container,
gfx::NativeWindow* tab) {
int handle = 0;
- int session_id = 0;
bool succeeded =
Send(new AutomationMsg_CreateExternalTab(0, settings,
external_tab_container,
tab,
- &handle,
- &session_id));
+ &handle));
if (!succeeded) {
return NULL;
}
diff --git a/chrome_frame/cfproxy.h b/chrome_frame/cfproxy.h
index 51c2153..bfcc998 100644
--- a/chrome_frame/cfproxy.h
+++ b/chrome_frame/cfproxy.h
@@ -157,7 +157,7 @@ class ChromeProxyDelegate {
// Sync message responses.
virtual void Completed_CreateTab(bool success, HWND chrome_wnd,
- HWND tab_window, int tab_handle, int session_id) = 0;
+ HWND tab_window, int tab_handle) = 0;
virtual void Completed_ConnectToTab(bool success, HWND chrome_window,
HWND tab_window, int tab_handle) = 0;
virtual void Completed_Navigate(bool success,
diff --git a/chrome_frame/cfproxy_proxy.cc b/chrome_frame/cfproxy_proxy.cc
index c5c0b62..e03cb0e 100644
--- a/chrome_frame/cfproxy_proxy.cc
+++ b/chrome_frame/cfproxy_proxy.cc
@@ -181,7 +181,7 @@ void CFProxy::Tab_Navigate(int tab, const GURL& url, const GURL& referrer) {
void CFProxy::CreateTab(ChromeProxyDelegate* delegate,
const IPC::ExternalTabSettings& p) {
- IPC::SyncMessage* m = new AutomationMsg_CreateExternalTab(0, p, 0, 0, 0, 0);
+ IPC::SyncMessage* m = new AutomationMsg_CreateExternalTab(0, p, 0, 0, 0);
sync_dispatcher_.QueueSyncMessage(m, delegate, NULL);
SendIpcMessage(m);
}
diff --git a/chrome_frame/cfproxy_support.cc b/chrome_frame/cfproxy_support.cc
index 004a2ea..42e6a28 100644
--- a/chrome_frame/cfproxy_support.cc
+++ b/chrome_frame/cfproxy_support.cc
@@ -20,7 +20,7 @@ void DispatchReplyFail(uint32 type,
SyncMessageContext* ctx) {
switch (type) {
case AutomationMsg_CreateExternalTab::ID:
- delegate->Completed_CreateTab(false, NULL, NULL, 0, 0);
+ delegate->Completed_CreateTab(false, NULL, NULL, NULL);
break;
case AutomationMsg_ConnectExternalTab::ID:
delegate->Completed_ConnectToTab(false, NULL, NULL, NULL);
@@ -38,12 +38,12 @@ bool DispatchReplyOk(const IPC::Message* reply_msg, uint32 type,
void* iter = IPC::SyncMessage::GetDataIterator(reply_msg);
switch (type) {
case AutomationMsg_CreateExternalTab::ID: {
- // Tuple4<HWND, HWND, int, int> out;
+ // Tuple3<HWND, HWND, int> out;
TupleTypes<AutomationMsg_CreateExternalTab::ReplyParam>::ValueTuple out;
if (ReadParam(reply_msg, &iter, &out)) {
DCHECK(tab2delegate->find(out.c) == tab2delegate->end());
(*tab2delegate)[out.c] = delegate;
- delegate->Completed_CreateTab(true, out.a, out.b, out.c, out.d);
+ delegate->Completed_CreateTab(true, out.a, out.b, out.c);
}
return true;
}
diff --git a/chrome_frame/cfproxy_test.cc b/chrome_frame/cfproxy_test.cc
index 566a398..28ba8c6 100644
--- a/chrome_frame/cfproxy_test.cc
+++ b/chrome_frame/cfproxy_test.cc
@@ -33,8 +33,8 @@ struct MockChromeProxyDelegate : public ChromeProxyDelegate {
MOCK_METHOD0(Disconnected, void());
MOCK_METHOD0(tab_handle, int());
- MOCK_METHOD5(Completed_CreateTab, void(bool success, HWND chrome_wnd,
- HWND tab_window, int tab_handle, int session_id));
+ MOCK_METHOD4(Completed_CreateTab, void(bool success, HWND chrome_wnd,
+ HWND tab_window, int tab_handle));
MOCK_METHOD4(Completed_ConnectToTab, void(bool success, HWND chrome_window,
HWND tab_window, int tab_handle));
MOCK_METHOD2(Completed_Navigate, void(bool success,
@@ -316,16 +316,7 @@ inline IPC::Message* CreateReply(M* m, const A& a, const B& b, const C& c) {
}
return r;
}
-
-template <typename M, typename A, typename B, typename C, typename D>
-inline IPC::Message* CreateReply(M* m, const A& a, const B& b, const C& c,
- const D& d) {
- IPC::Message* r = IPC::SyncMessage::GenerateReply(m);
- if (r) {
- M::WriteReplyParams(r, a, b, c, d);
- }
- return r;
-}} // namespace
+} // namespace
DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncMsgSender);
TEST(SyncMsgSender, Deserialize) {
@@ -338,16 +329,12 @@ TEST(SyncMsgSender, Deserialize) {
TabsMap tab2delegate;
SyncMsgSender queue(&tab2delegate);
- const int kTabHandle = 6;
- const int kSessionId = 8;
-
// Create some sync messages and their replies.
AutomationMsg_InstallExtension m1(0, FilePath(L"c:\\awesome.x"), 0);
- AutomationMsg_CreateExternalTab m2(0, IPC::ExternalTabSettings(), 0, 0, 0, 0);
+ AutomationMsg_CreateExternalTab m2(0, IPC::ExternalTabSettings(), 0, 0, 0);
scoped_ptr<IPC::Message> r1(CreateReply(&m1,
AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED));
- scoped_ptr<IPC::Message> r2(CreateReply(&m2, (HWND)1, (HWND)2, kTabHandle,
- kSessionId));
+ scoped_ptr<IPC::Message> r2(CreateReply(&m2, (HWND)1, (HWND)2, 6));
queue.QueueSyncMessage(&m1, &d1, NULL);
queue.QueueSyncMessage(&m2, &d1, NULL);
@@ -355,8 +342,7 @@ TEST(SyncMsgSender, Deserialize) {
testing::InSequence s;
EXPECT_CALL(d1, Completed_InstallExtension(true,
AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED, NULL));
- EXPECT_CALL(d1, Completed_CreateTab(true, (HWND)1, (HWND)2, kTabHandle,
- kSessionId));
+ EXPECT_CALL(d1, Completed_CreateTab(true, (HWND)1, (HWND)2, 6));
// Execute replies in a worker thread.
ipc.message_loop()->PostTask(FROM_HERE, NewRunnableMethod(&queue,
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h
index 19c0ebf..def29b8 100644
--- a/chrome_frame/chrome_frame_activex_base.h
+++ b/chrome_frame/chrome_frame_activex_base.h
@@ -166,7 +166,6 @@ class ATL_NO_VTABLE ChromeFrameActivexBase : // NOLINT
public com_util::IProvideClassInfo2Impl<class_id,
DIID_DIChromeFrameEvents>,
public com_util::IDispatchImpl<IChromeFrame>,
- public IChromeFrameInternal,
public IConnectionPointContainerImpl<T>,
public ProxyDIChromeFrameEvents<T>,
public IPropertyNotifySinkCP<T>,
@@ -201,7 +200,6 @@ DECLARE_NOT_AGGREGATABLE(T)
BEGIN_COM_MAP(ChromeFrameActivexBase)
COM_INTERFACE_ENTRY(IChromeFrame)
COM_INTERFACE_ENTRY(IDispatch)
- COM_INTERFACE_ENTRY(IChromeFrameInternal)
COM_INTERFACE_ENTRY(IViewObjectEx)
COM_INTERFACE_ENTRY(IViewObject2)
COM_INTERFACE_ENTRY(IViewObject)
@@ -891,17 +889,6 @@ END_MSG_MAP()
return S_OK;
}
- STDMETHOD(getSessionId)(int* session_id) {
- DCHECK(automation_client_.get());
- if (!is_privileged_) {
- DLOG(ERROR) << "Attempt to getSessionId in non-privileged mode";
- return E_ACCESSDENIED;
- }
-
- *session_id = automation_client_->GetSessionId();
- return (*session_id) == -1 ? S_FALSE : S_OK;
- }
-
STDMETHOD(registerBhoIfNeeded)() {
return E_NOTIMPL;
}
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 96c8d1e..35f36e7 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -571,7 +571,6 @@ ChromeFrameAutomationClient::ChromeFrameAutomationClient()
proxy_factory_(g_proxy_factory.get()),
handle_top_level_requests_(false),
tab_handle_(-1),
- session_id_(-1),
external_tab_cookie_(0),
url_fetcher_(NULL),
url_fetcher_flags_(PluginUrlRequestManager::NOT_THREADSAFE),
@@ -900,10 +899,6 @@ void ChromeFrameAutomationClient::GetEnabledExtensionsComplete(
delete extension_directories;
}
-int ChromeFrameAutomationClient::GetSessionId() const {
- return session_id_;
-}
-
void ChromeFrameAutomationClient::OnChromeFrameHostMoved() {
// Use a local var to avoid the small possibility of getting the tab_
// member be cleared while we try to use it.
@@ -966,13 +961,13 @@ void ChromeFrameAutomationClient::CreateExternalTab() {
2);
IPC::SyncMessage* message =
- new AutomationMsg_CreateExternalTab(0, settings, NULL, NULL, 0, 0);
+ new AutomationMsg_CreateExternalTab(0, settings, NULL, NULL, NULL);
automation_server_->SendAsAsync(message, new CreateExternalTabContext(this),
this);
}
AutomationLaunchResult ChromeFrameAutomationClient::CreateExternalTabComplete(
- HWND chrome_window, HWND tab_window, int tab_handle, int session_id) {
+ HWND chrome_window, HWND tab_window, int tab_handle) {
if (!automation_server_) {
// If we receive this notification while shutting down, do nothing.
DLOG(ERROR) << "CreateExternalTabComplete called when automation server "
@@ -989,7 +984,6 @@ AutomationLaunchResult ChromeFrameAutomationClient::CreateExternalTabComplete(
tab_ = automation_server_->CreateTabProxy(tab_handle);
tab_->AddObserver(this);
tab_handle_ = tab_handle;
- session_id_ = session_id;
}
return launch_result;
}
diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h
index cb1b282..47b03c0 100644
--- a/chrome_frame/chrome_frame_automation.h
+++ b/chrome_frame/chrome_frame_automation.h
@@ -364,9 +364,6 @@ class ChromeFrameAutomationClient
void* user_data,
std::vector<FilePath>* extension_directories);
- // Returns the session ID used to identify a Tab in Chrome.
- virtual int GetSessionId() const;
-
virtual void OnChromeFrameHostMoved();
TabProxy* tab() const { return tab_.get(); }
@@ -461,8 +458,7 @@ class ChromeFrameAutomationClient
void CreateExternalTab();
AutomationLaunchResult CreateExternalTabComplete(HWND chrome_window,
HWND tab_window,
- int tab_handle,
- int session_id);
+ int tab_handle);
// Called in UI thread. Here we fire event to the client notifying for
// the result of Initialize() method call.
void InitializeComplete(AutomationLaunchResult result);
@@ -533,8 +529,6 @@ class ChromeFrameAutomationClient
bool handle_top_level_requests_;
ProxyFactory* proxy_factory_;
int tab_handle_;
- // The SessionId used by Chrome as the id in the Javascript Tab object.
- int session_id_;
// Only used if we attach to an existing tab.
uint64 external_tab_cookie_;
diff --git a/chrome_frame/chrome_tab.idl b/chrome_frame/chrome_tab.idl
index 7120910..f934673 100644
--- a/chrome_frame/chrome_tab.idl
+++ b/chrome_frame/chrome_tab.idl
@@ -84,23 +84,13 @@ interface IChromeFrame : IDispatch {
};
[
- uuid(851bedec-4b2c-4959-abc0-a53403117257)
-]
-// Internal implementation interface. Not intended as an API. May change
-// frequently, don't treat this as frozen.
-interface IChromeFrameInternal : IUnknown {
- // This method is available only when the control is in privileged mode.
- HRESULT getSessionId([out, retval] int* session_id);
-};
-
-[
object,
uuid(655A11E0-EF63-4fbe-9DF6-C182D2FCD6DC),
oleautomation,
nonextensible,
hidden,
]
-interface IChromeFramePrivileged : IUnknown {
+interface IChromeFramePrivileged: IUnknown {
// If the host returns false for wants_privileged, the control
// won't enable privileged mode.
HRESULT GetWantsPrivileged([out] boolean *wants_privileged);
diff --git a/chrome_frame/custom_sync_call_context.h b/chrome_frame/custom_sync_call_context.h
index 6162213..9cbe3d6 100644
--- a/chrome_frame/custom_sync_call_context.h
+++ b/chrome_frame/custom_sync_call_context.h
@@ -85,16 +85,15 @@ class GetEnabledExtensionsContext
class CreateExternalTabContext
: public SyncMessageReplyDispatcher::SyncMessageCallContext {
public:
- typedef Tuple4<HWND, HWND, int, int> output_type;
+ typedef Tuple3<HWND, HWND, int> output_type;
explicit CreateExternalTabContext(ChromeFrameAutomationClient* client)
: client_(client) {
}
- void Completed(HWND chrome_window, HWND tab_window, int tab_handle,
- int session_id) {
+ void Completed(HWND chrome_window, HWND tab_window, int tab_handle) {
AutomationLaunchResult launch_result =
client_->CreateExternalTabComplete(chrome_window, tab_window,
- tab_handle, session_id);
+ tab_handle);
client_->PostTask(FROM_HERE,
NewRunnableMethod(
client_.get(),
diff --git a/chrome_frame/external_tab.cc b/chrome_frame/external_tab.cc
index 7b6fe92..4bfeff2 100644
--- a/chrome_frame/external_tab.cc
+++ b/chrome_frame/external_tab.cc
@@ -194,8 +194,7 @@ void ExternalTabProxy::ChromeFrameHostMoved() {
//////////////////////////////////////////////////////////////////////////
void ExternalTabProxy::UiCompleted_CreateTab(bool success, HWND chrome_window,
- HWND tab_window, int tab_handle,
- int session_id) {
+ HWND tab_window, int tab_handle) {
if (success) {
state_ = READY;
tab_ = tab_handle;
@@ -211,12 +210,11 @@ void ExternalTabProxy::UiCompleted_CreateTab(bool success, HWND chrome_window,
}
void ExternalTabProxy::Completed_CreateTab(bool success, HWND chrome_wnd,
- HWND tab_window, int tab_handle,
- int session_id) {
+ HWND tab_window, int tab_handle) {
// in ipc_thread.
ui_.PostTask(FROM_HERE, NewRunnableMethod(this,
&ExternalTabProxy::UiCompleted_CreateTab,
- success, chrome_wnd, tab_window, tab_handle, session_id));
+ success, chrome_wnd, tab_window, tab_handle));
}
void ExternalTabProxy::Completed_ConnectToTab(bool success,
diff --git a/chrome_frame/external_tab.h b/chrome_frame/external_tab.h
index 707c701..b68a9bf 100644
--- a/chrome_frame/external_tab.h
+++ b/chrome_frame/external_tab.h
@@ -126,9 +126,8 @@ class ExternalTabProxy : public CWindowImpl<ExternalTabProxy>,
// Sync message responses.
- // TODO(stoyan): Error_code
virtual void Completed_CreateTab(bool success, HWND chrome_wnd,
- HWND tab_window, int tab_handle, int session_id);
+ HWND tab_window, int tab_handle); // TODO(stoyan): Error_code
virtual void Completed_ConnectToTab(bool success, HWND chrome_window,
HWND tab_window, int tab_handle);
virtual void Completed_Navigate(bool success,
@@ -182,7 +181,7 @@ class ExternalTabProxy : public CWindowImpl<ExternalTabProxy>,
void UiConnected(ChromeProxy* proxy);
void UiPeerLost(ChromeProxy* proxy, DisconnectReason reason);
void UiCompleted_CreateTab(bool success, HWND chrome_window,
- HWND tab_window, int tab_handle, int session_id);
+ HWND tab_window, int tab_handle);
// With the present state of affairs the only response we can possibly handle
// in the background IPC thread is Completed_CreateTab() where we can
diff --git a/chrome_frame/external_tab_test.cc b/chrome_frame/external_tab_test.cc
index 375e4fb..0e49f95 100644
--- a/chrome_frame/external_tab_test.cc
+++ b/chrome_frame/external_tab_test.cc
@@ -133,11 +133,10 @@ struct AsyncEventCreator {
}
void Fire_CompletedCreateTab(bool success, HWND chrome_wnd, HWND tab_window,
- int tab_handle, int session_id,
- base::TimeDelta delay) {
+ int tab_handle, base::TimeDelta delay) {
ipc_loop_->PostDelayedTask(FROM_HERE, NewRunnableMethod(delegate_,
&ChromeProxyDelegate::Completed_CreateTab, success, chrome_wnd,
- tab_window, tab_handle, session_id), delay.InMilliseconds());
+ tab_window, tab_handle), delay.InMilliseconds());
}
void Fire_TabLoaded(const GURL& url, base::TimeDelta delay) {
@@ -174,7 +173,7 @@ TEST(ExternalTabProxy, CancelledCreateTab) {
EXPECT_CALL(*proxy, RemoveDelegate(_)).WillOnce(DoAll(
InvokeWithoutArgs(CreateFunctor(&async_events,
&AsyncEventCreator::Fire_CompletedCreateTab, false, HWND(0), HWND(0),
- 0, 0, base::TimeDelta::FromMilliseconds(0))),
+ 0, base::TimeDelta::FromMilliseconds(0))),
InvokeWithoutArgs(CreateFunctor(&async_events,
&AsyncEventCreator::Fire_Disconnected,
base::TimeDelta::FromMilliseconds(0))),
@@ -217,7 +216,7 @@ TEST(ExternalTabProxy, NavigateAfterCreate) {
.WillOnce(DoAll(
InvokeWithoutArgs(CreateFunctor(&async_events,
&AsyncEventCreator::Fire_CompletedCreateTab,
- true, HWND(0), HWND(0), 7, 0, base::TimeDelta::FromMilliseconds(9))),
+ true, HWND(0), HWND(0), 7, base::TimeDelta::FromMilliseconds(9))),
InvokeWithoutArgs(CreateFunctor(&async_events,
&AsyncEventCreator::Fire_TabLoaded, real_url,
base::TimeDelta::FromMilliseconds(150)))));
diff --git a/chrome_frame/test/automation_client_mock.cc b/chrome_frame/test/automation_client_mock.cc
index 7e8f317..a77b023 100644
--- a/chrome_frame/test/automation_client_mock.cc
+++ b/chrome_frame/test/automation_client_mock.cc
@@ -70,15 +70,13 @@ MATCHER_P(EqNavigationInfoUrl, url, "IPC::NavigationInfo matcher") {
}
// Could be implemented as MockAutomationProxy member (we have WithArgs<>!)
-ACTION_P4(HandleCreateTab, tab_handle, external_tab_container, tab_wnd,
- session_id) {
+ACTION_P3(HandleCreateTab, tab_handle, external_tab_container, tab_wnd) {
// arg0 - message
// arg1 - callback
// arg2 - key
CreateExternalTabContext::output_type input_args(tab_wnd,
external_tab_container,
- tab_handle,
- session_id);
+ tab_handle);
CreateExternalTabContext* context =
reinterpret_cast<CreateExternalTabContext*>(arg1);
DispatchToMethod(context, &CreateExternalTabContext::Completed, input_args);
@@ -255,7 +253,7 @@ TEST_F(CFACMockTest, MockedCreateTabOk) {
EXPECT_CALL(mock_proxy_, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _))
- .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99));
+ .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2));
EXPECT_CALL(mock_proxy_, CreateTabProxy(testing::Eq(tab_handle_)))
.WillOnce(Return(tab_));
@@ -289,8 +287,7 @@ TEST_F(CFACMockTest, MockedCreateTabFailed) {
EXPECT_CALL(mock_proxy_, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _))
- .Times(1).WillOnce(HandleCreateTab(tab_handle_, null_wnd, null_wnd,
- 99));
+ .Times(1).WillOnce(HandleCreateTab(tab_handle_, null_wnd, null_wnd));
EXPECT_CALL(mock_proxy_, CreateTabProxy(_)).Times(0);
@@ -351,9 +348,9 @@ TEST_F(CFACMockTest, OnChannelError) {
EXPECT_CALL(proxy, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _)).Times(3)
- .WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99))
- .WillOnce(HandleCreateTab(tab_handle_ * 2, h1, h2, 100))
- .WillOnce(HandleCreateTab(tab_handle_ * 3, h1, h2, 101));
+ .WillOnce(HandleCreateTab(tab_handle_, h1, h2))
+ .WillOnce(HandleCreateTab(tab_handle_ * 2, h1, h2))
+ .WillOnce(HandleCreateTab(tab_handle_ * 3, h1, h2));
SetAutomationServerOk(3);
@@ -431,7 +428,7 @@ TEST_F(CFACMockTest, NavigateTwiceAfterInitToSameUrl) {
EXPECT_CALL(mock_proxy_, SendAsAsync(testing::Property(
&IPC::SyncMessage::type, AutomationMsg_CreateExternalTab__ID),
testing::NotNull(), _))
- .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99));
+ .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2));
EXPECT_CALL(mock_proxy_, CreateTabProxy(testing::Eq(tab_handle_)))
.WillOnce(Return(tab_));