diff options
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/cfproxy.h | 4 | ||||
-rw-r--r-- | chrome_frame/cfproxy_proxy.cc | 6 | ||||
-rw-r--r-- | chrome_frame/cfproxy_support.cc | 12 | ||||
-rw-r--r-- | chrome_frame/cfproxy_test.cc | 32 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 15 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 14 | ||||
-rw-r--r-- | chrome_frame/chrome_frame_automation.h | 8 | ||||
-rw-r--r-- | chrome_frame/custom_sync_call_context.h | 7 | ||||
-rw-r--r-- | chrome_frame/external_tab.cc | 10 | ||||
-rw-r--r-- | chrome_frame/external_tab.h | 6 | ||||
-rw-r--r-- | chrome_frame/external_tab_test.cc | 9 | ||||
-rw-r--r-- | chrome_frame/test/automation_client_mock.cc | 19 |
12 files changed, 95 insertions, 47 deletions
diff --git a/chrome_frame/cfproxy.h b/chrome_frame/cfproxy.h index bfcc998..513c2c5 100644 --- a/chrome_frame/cfproxy.h +++ b/chrome_frame/cfproxy.h @@ -157,9 +157,9 @@ class ChromeProxyDelegate { // Sync message responses. virtual void Completed_CreateTab(bool success, HWND chrome_wnd, - HWND tab_window, int tab_handle) = 0; + HWND tab_window, int tab_handle, int session_id) = 0; virtual void Completed_ConnectToTab(bool success, HWND chrome_window, - HWND tab_window, int tab_handle) = 0; + HWND tab_window, int tab_handle, int session_id) = 0; virtual void Completed_Navigate(bool success, enum AutomationMsg_NavigationResponseValues res) = 0; virtual void Completed_InstallExtension(bool success, diff --git a/chrome_frame/cfproxy_proxy.cc b/chrome_frame/cfproxy_proxy.cc index e03cb0e..5d6a780 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); + IPC::SyncMessage* m = new AutomationMsg_CreateExternalTab(0, p, 0, 0, 0, 0); sync_dispatcher_.QueueSyncMessage(m, delegate, NULL); SendIpcMessage(m); } @@ -189,14 +189,14 @@ void CFProxy::CreateTab(ChromeProxyDelegate* delegate, void CFProxy::ConnectTab(ChromeProxyDelegate* delegate, HWND hwnd, uint64 cookie) { IPC::SyncMessage* m = new AutomationMsg_ConnectExternalTab(0, cookie, true, - hwnd, NULL, NULL, NULL); + hwnd, NULL, NULL, NULL, 0); sync_dispatcher_.QueueSyncMessage(m, delegate, NULL); SendIpcMessage(m); } void CFProxy::BlockTab(uint64 cookie) { IPC::SyncMessage* m = new AutomationMsg_ConnectExternalTab(0, cookie, false, - NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, 0); sync_dispatcher_.QueueSyncMessage(m, NULL, NULL); SendIpcMessage(m); } diff --git a/chrome_frame/cfproxy_support.cc b/chrome_frame/cfproxy_support.cc index 42e6a28..6b5224b 100644 --- a/chrome_frame/cfproxy_support.cc +++ b/chrome_frame/cfproxy_support.cc @@ -20,10 +20,10 @@ void DispatchReplyFail(uint32 type, SyncMessageContext* ctx) { switch (type) { case AutomationMsg_CreateExternalTab::ID: - delegate->Completed_CreateTab(false, NULL, NULL, NULL); + delegate->Completed_CreateTab(false, NULL, NULL, 0, 0); break; case AutomationMsg_ConnectExternalTab::ID: - delegate->Completed_ConnectToTab(false, NULL, NULL, NULL); + delegate->Completed_ConnectToTab(false, NULL, NULL, 0, 0); break; case AutomationMsg_InstallExtension::ID: delegate->Completed_InstallExtension(false, @@ -38,23 +38,23 @@ bool DispatchReplyOk(const IPC::Message* reply_msg, uint32 type, void* iter = IPC::SyncMessage::GetDataIterator(reply_msg); switch (type) { case AutomationMsg_CreateExternalTab::ID: { - // Tuple3<HWND, HWND, int> out; + // Tuple4<HWND, HWND, int, 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); + delegate->Completed_CreateTab(true, out.a, out.b, out.c, out.d); } return true; } case AutomationMsg_ConnectExternalTab::ID: { - // Tuple3<HWND, HWND, int> out; + // Tuple4<HWND, HWND, int, int> out; TupleTypes<AutomationMsg_ConnectExternalTab::ReplyParam>::ValueTuple out; if (ReadParam(reply_msg, &iter, &out)) { DCHECK(tab2delegate->find(out.c) == tab2delegate->end()); (*tab2delegate)[out.c] = delegate; - delegate->Completed_ConnectToTab(true, out.a, out.b, out.c); + delegate->Completed_ConnectToTab(true, out.a, out.b, out.c, out.d); } return true; } diff --git a/chrome_frame/cfproxy_test.cc b/chrome_frame/cfproxy_test.cc index 28ba8c6..5b2937c 100644 --- a/chrome_frame/cfproxy_test.cc +++ b/chrome_frame/cfproxy_test.cc @@ -33,10 +33,10 @@ struct MockChromeProxyDelegate : public ChromeProxyDelegate { MOCK_METHOD0(Disconnected, void()); MOCK_METHOD0(tab_handle, int()); - 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_METHOD5(Completed_CreateTab, void(bool success, HWND chrome_wnd, + HWND tab_window, int tab_handle, int session_id)); + MOCK_METHOD5(Completed_ConnectToTab, void(bool success, HWND chrome_window, + HWND tab_window, int tab_handle, int session_id)); MOCK_METHOD2(Completed_Navigate, void(bool success, enum AutomationMsg_NavigationResponseValues res)); MOCK_METHOD3(Completed_InstallExtension, void(bool success, @@ -274,7 +274,7 @@ TEST(ChromeProxy, ChannelError) { InvokeWithoutArgs(&connected, &base::WaitableEvent::Signal))); EXPECT_CALL(api.sender, Send(_)); - EXPECT_CALL(delegate, Completed_ConnectToTab(false, _, _, _)); + EXPECT_CALL(delegate, Completed_ConnectToTab(false, _, _, _, _)); EXPECT_CALL(api, CloseChannel(&api.sender)); EXPECT_CALL(delegate, PeerLost(_, ChromeProxyDelegate::CHANNEL_ERROR)); @@ -316,7 +316,16 @@ inline IPC::Message* CreateReply(M* m, const A& a, const B& b, const C& c) { } return r; } -} // namespace + +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 DISABLE_RUNNABLE_METHOD_REFCOUNT(SyncMsgSender); TEST(SyncMsgSender, Deserialize) { @@ -329,12 +338,16 @@ 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); + AutomationMsg_CreateExternalTab m2(0, IPC::ExternalTabSettings(), 0, 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, 6)); + scoped_ptr<IPC::Message> r2(CreateReply(&m2, (HWND)1, (HWND)2, kTabHandle, + kSessionId)); queue.QueueSyncMessage(&m1, &d1, NULL); queue.QueueSyncMessage(&m2, &d1, NULL); @@ -342,7 +355,8 @@ 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, 6)); + EXPECT_CALL(d1, Completed_CreateTab(true, (HWND)1, (HWND)2, kTabHandle, + kSessionId)); // 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 def29b8..736c690 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -166,6 +166,7 @@ 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>, @@ -200,6 +201,7 @@ 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) @@ -889,6 +891,19 @@ END_MSG_MAP() return S_OK; } + STDMETHOD(getSessionId)(int* session_id) { + DCHECK(automation_client_.get()); + DCHECK(session_id); + + 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 d50f26b..b05c32aa 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -571,6 +571,7 @@ 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), @@ -899,6 +900,10 @@ 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. @@ -961,13 +966,13 @@ void ChromeFrameAutomationClient::CreateExternalTab() { 2); IPC::SyncMessage* message = - new AutomationMsg_CreateExternalTab(0, settings, NULL, NULL, NULL); + new AutomationMsg_CreateExternalTab(0, settings, NULL, NULL, 0, 0); automation_server_->SendAsAsync(message, new CreateExternalTabContext(this), this); } AutomationLaunchResult ChromeFrameAutomationClient::CreateExternalTabComplete( - HWND chrome_window, HWND tab_window, int tab_handle) { + HWND chrome_window, HWND tab_window, int tab_handle, int session_id) { if (!automation_server_) { // If we receive this notification while shutting down, do nothing. DLOG(ERROR) << "CreateExternalTabComplete called when automation server " @@ -984,6 +989,7 @@ AutomationLaunchResult ChromeFrameAutomationClient::CreateExternalTabComplete( tab_ = automation_server_->CreateTabProxy(tab_handle); tab_->AddObserver(this); tab_handle_ = tab_handle; + session_id_ = session_id; } return launch_result; } @@ -1030,7 +1036,7 @@ void ChromeFrameAutomationClient::LaunchComplete( // ExternalTab. IPC::SyncMessage* message = new AutomationMsg_ConnectExternalTab(0, external_tab_cookie_, true, - m_hWnd, NULL, NULL, NULL); + m_hWnd, NULL, NULL, NULL, 0); automation_server_->SendAsAsync(message, new CreateExternalTabContext(this), this); @@ -1367,7 +1373,7 @@ void ChromeFrameAutomationClient::BlockExternalTab(uint64 cookie) { // The host does not want this tab to be shown (due popup blocker). IPC::SyncMessage* message = new AutomationMsg_ConnectExternalTab(0, cookie, false, m_hWnd, - NULL, NULL, NULL); + NULL, NULL, NULL, 0); automation_server_->SendAsAsync(message, NULL, this); } diff --git a/chrome_frame/chrome_frame_automation.h b/chrome_frame/chrome_frame_automation.h index 47b03c0..cb1b282 100644 --- a/chrome_frame/chrome_frame_automation.h +++ b/chrome_frame/chrome_frame_automation.h @@ -364,6 +364,9 @@ 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(); } @@ -458,7 +461,8 @@ class ChromeFrameAutomationClient void CreateExternalTab(); AutomationLaunchResult CreateExternalTabComplete(HWND chrome_window, HWND tab_window, - int tab_handle); + int tab_handle, + int session_id); // Called in UI thread. Here we fire event to the client notifying for // the result of Initialize() method call. void InitializeComplete(AutomationLaunchResult result); @@ -529,6 +533,8 @@ 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/custom_sync_call_context.h b/chrome_frame/custom_sync_call_context.h index 9cbe3d6..6162213 100644 --- a/chrome_frame/custom_sync_call_context.h +++ b/chrome_frame/custom_sync_call_context.h @@ -85,15 +85,16 @@ class GetEnabledExtensionsContext class CreateExternalTabContext : public SyncMessageReplyDispatcher::SyncMessageCallContext { public: - typedef Tuple3<HWND, HWND, int> output_type; + typedef Tuple4<HWND, HWND, int, int> output_type; explicit CreateExternalTabContext(ChromeFrameAutomationClient* client) : client_(client) { } - void Completed(HWND chrome_window, HWND tab_window, int tab_handle) { + void Completed(HWND chrome_window, HWND tab_window, int tab_handle, + int session_id) { AutomationLaunchResult launch_result = client_->CreateExternalTabComplete(chrome_window, tab_window, - tab_handle); + tab_handle, session_id); client_->PostTask(FROM_HERE, NewRunnableMethod( client_.get(), diff --git a/chrome_frame/external_tab.cc b/chrome_frame/external_tab.cc index 4bfeff2..211b48d 100644 --- a/chrome_frame/external_tab.cc +++ b/chrome_frame/external_tab.cc @@ -194,7 +194,8 @@ void ExternalTabProxy::ChromeFrameHostMoved() { ////////////////////////////////////////////////////////////////////////// void ExternalTabProxy::UiCompleted_CreateTab(bool success, HWND chrome_window, - HWND tab_window, int tab_handle) { + HWND tab_window, int tab_handle, + int session_id) { if (success) { state_ = READY; tab_ = tab_handle; @@ -210,15 +211,16 @@ void ExternalTabProxy::UiCompleted_CreateTab(bool success, HWND chrome_window, } void ExternalTabProxy::Completed_CreateTab(bool success, HWND chrome_wnd, - HWND tab_window, int tab_handle) { + HWND tab_window, int tab_handle, + int session_id) { // in ipc_thread. ui_.PostTask(FROM_HERE, NewRunnableMethod(this, &ExternalTabProxy::UiCompleted_CreateTab, - success, chrome_wnd, tab_window, tab_handle)); + success, chrome_wnd, tab_window, tab_handle, session_id)); } void ExternalTabProxy::Completed_ConnectToTab(bool success, - HWND chrome_window, HWND tab_window, int tab_handle) { + HWND chrome_window, HWND tab_window, int tab_handle, int session_id) { CHECK(0); } diff --git a/chrome_frame/external_tab.h b/chrome_frame/external_tab.h index b68a9bf..cd8551a 100644 --- a/chrome_frame/external_tab.h +++ b/chrome_frame/external_tab.h @@ -127,9 +127,9 @@ class ExternalTabProxy : public CWindowImpl<ExternalTabProxy>, // Sync message responses. virtual void Completed_CreateTab(bool success, HWND chrome_wnd, - HWND tab_window, int tab_handle); // TODO(stoyan): Error_code + HWND tab_window, int tab_handle, int session_id); virtual void Completed_ConnectToTab(bool success, HWND chrome_window, - HWND tab_window, int tab_handle); + HWND tab_window, int tab_handle, int session_id); virtual void Completed_Navigate(bool success, enum AutomationMsg_NavigationResponseValues res); virtual void Completed_InstallExtension(bool success, @@ -181,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); + HWND tab_window, int tab_handle, int session_id); // 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 0e49f95..375e4fb 100644 --- a/chrome_frame/external_tab_test.cc +++ b/chrome_frame/external_tab_test.cc @@ -133,10 +133,11 @@ struct AsyncEventCreator { } void Fire_CompletedCreateTab(bool success, HWND chrome_wnd, HWND tab_window, - int tab_handle, base::TimeDelta delay) { + int tab_handle, int session_id, + base::TimeDelta delay) { ipc_loop_->PostDelayedTask(FROM_HERE, NewRunnableMethod(delegate_, &ChromeProxyDelegate::Completed_CreateTab, success, chrome_wnd, - tab_window, tab_handle), delay.InMilliseconds()); + tab_window, tab_handle, session_id), delay.InMilliseconds()); } void Fire_TabLoaded(const GURL& url, base::TimeDelta delay) { @@ -173,7 +174,7 @@ TEST(ExternalTabProxy, CancelledCreateTab) { EXPECT_CALL(*proxy, RemoveDelegate(_)).WillOnce(DoAll( InvokeWithoutArgs(CreateFunctor(&async_events, &AsyncEventCreator::Fire_CompletedCreateTab, false, HWND(0), HWND(0), - 0, base::TimeDelta::FromMilliseconds(0))), + 0, 0, base::TimeDelta::FromMilliseconds(0))), InvokeWithoutArgs(CreateFunctor(&async_events, &AsyncEventCreator::Fire_Disconnected, base::TimeDelta::FromMilliseconds(0))), @@ -216,7 +217,7 @@ TEST(ExternalTabProxy, NavigateAfterCreate) { .WillOnce(DoAll( InvokeWithoutArgs(CreateFunctor(&async_events, &AsyncEventCreator::Fire_CompletedCreateTab, - true, HWND(0), HWND(0), 7, base::TimeDelta::FromMilliseconds(9))), + true, HWND(0), HWND(0), 7, 0, 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 a77b023..7e8f317 100644 --- a/chrome_frame/test/automation_client_mock.cc +++ b/chrome_frame/test/automation_client_mock.cc @@ -70,13 +70,15 @@ MATCHER_P(EqNavigationInfoUrl, url, "IPC::NavigationInfo matcher") { } // Could be implemented as MockAutomationProxy member (we have WithArgs<>!) -ACTION_P3(HandleCreateTab, tab_handle, external_tab_container, tab_wnd) { +ACTION_P4(HandleCreateTab, tab_handle, external_tab_container, tab_wnd, + session_id) { // arg0 - message // arg1 - callback // arg2 - key CreateExternalTabContext::output_type input_args(tab_wnd, external_tab_container, - tab_handle); + tab_handle, + session_id); CreateExternalTabContext* context = reinterpret_cast<CreateExternalTabContext*>(arg1); DispatchToMethod(context, &CreateExternalTabContext::Completed, input_args); @@ -253,7 +255,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)); + .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99)); EXPECT_CALL(mock_proxy_, CreateTabProxy(testing::Eq(tab_handle_))) .WillOnce(Return(tab_)); @@ -287,7 +289,8 @@ 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)); + .Times(1).WillOnce(HandleCreateTab(tab_handle_, null_wnd, null_wnd, + 99)); EXPECT_CALL(mock_proxy_, CreateTabProxy(_)).Times(0); @@ -348,9 +351,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)) - .WillOnce(HandleCreateTab(tab_handle_ * 2, h1, h2)) - .WillOnce(HandleCreateTab(tab_handle_ * 3, h1, h2)); + .WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99)) + .WillOnce(HandleCreateTab(tab_handle_ * 2, h1, h2, 100)) + .WillOnce(HandleCreateTab(tab_handle_ * 3, h1, h2, 101)); SetAutomationServerOk(3); @@ -428,7 +431,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)); + .Times(1).WillOnce(HandleCreateTab(tab_handle_, h1, h2, 99)); EXPECT_CALL(mock_proxy_, CreateTabProxy(testing::Eq(tab_handle_))) .WillOnce(Return(tab_)); |