| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome_frame/test/automation_client_mock.h" | 5 #include "chrome_frame/test/automation_client_mock.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "chrome/common/automation_messages.h" | 9 #include "chrome/common/automation_messages.h" |
| 10 #include "chrome_frame/custom_sync_call_context.h" | 10 #include "chrome_frame/custom_sync_call_context.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 loop_.RunFor(base::TimeDelta::FromSeconds(4)); | 306 loop_.RunFor(base::TimeDelta::FromSeconds(4)); |
| 307 client_->Uninitialize(); | 307 client_->Uninitialize(); |
| 308 } | 308 } |
| 309 | 309 |
| 310 class TestChromeFrameAutomationProxyImpl | 310 class TestChromeFrameAutomationProxyImpl |
| 311 : public ChromeFrameAutomationProxyImpl { | 311 : public ChromeFrameAutomationProxyImpl { |
| 312 public: | 312 public: |
| 313 TestChromeFrameAutomationProxyImpl() | 313 TestChromeFrameAutomationProxyImpl() |
| 314 // 1 is an unneeded timeout. | 314 // 1 is an unneeded timeout. |
| 315 : ChromeFrameAutomationProxyImpl( | 315 : ChromeFrameAutomationProxyImpl( |
| 316 NULL, AutomationProxy::GenerateChannelID(), 1) { | 316 NULL, |
| 317 AutomationProxy::GenerateChannelID(), |
| 318 base::TimeDelta::FromMilliseconds(1)) { |
| 317 } | 319 } |
| 318 MOCK_METHOD3( | 320 MOCK_METHOD3( |
| 319 SendAsAsync, | 321 SendAsAsync, |
| 320 void(IPC::SyncMessage* msg, | 322 void(IPC::SyncMessage* msg, |
| 321 SyncMessageReplyDispatcher::SyncMessageCallContext* context, | 323 SyncMessageReplyDispatcher::SyncMessageCallContext* context, |
| 322 void* key)); | 324 void* key)); |
| 323 void FakeChannelError() { | 325 void FakeChannelError() { |
| 324 reinterpret_cast<IPC::ChannelProxy::MessageFilter*>(message_filter_.get())-> | 326 reinterpret_cast<IPC::ChannelProxy::MessageFilter*>(message_filter_.get())-> |
| 325 OnChannelError(); | 327 OnChannelError(); |
| 326 } | 328 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 GURL("http://www.nonexistent.com"), empty, profile_path_, | 465 GURL("http://www.nonexistent.com"), empty, profile_path_, |
| 464 profile_path_.BaseName().value(), L"", false, false, false, false)); | 466 profile_path_.BaseName().value(), L"", false, false, false, false)); |
| 465 launch_params->set_launch_timeout(timeout); | 467 launch_params->set_launch_timeout(timeout); |
| 466 launch_params->set_version_check(false); | 468 launch_params->set_version_check(false); |
| 467 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); | 469 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); |
| 468 loop_.RunFor(base::TimeDelta::FromSeconds(10)); | 470 loop_.RunFor(base::TimeDelta::FromSeconds(10)); |
| 469 | 471 |
| 470 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); | 472 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); |
| 471 client_->Uninitialize(); | 473 client_->Uninitialize(); |
| 472 } | 474 } |
| OLD | NEW |