OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome_frame/test/automation_client_mock.h" | 4 #include "chrome_frame/test/automation_client_mock.h" |
5 | 5 |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
8 #include "chrome_frame/custom_sync_call_context.h" | 8 #include "chrome_frame/custom_sync_call_context.h" |
9 #include "chrome_frame/test/chrome_frame_test_utils.h" | 9 #include "chrome_frame/test/chrome_frame_test_utils.h" |
10 | 10 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 EXPECT_TRUE(client_->Initialize(&cfd_, clp)); | 308 EXPECT_TRUE(client_->Initialize(&cfd_, clp)); |
309 loop_.RunFor(4); | 309 loop_.RunFor(4); |
310 client_->Uninitialize(); | 310 client_->Uninitialize(); |
311 } | 311 } |
312 | 312 |
313 class TestChromeFrameAutomationProxyImpl | 313 class TestChromeFrameAutomationProxyImpl |
314 : public ChromeFrameAutomationProxyImpl { | 314 : public ChromeFrameAutomationProxyImpl { |
315 public: | 315 public: |
316 TestChromeFrameAutomationProxyImpl() | 316 TestChromeFrameAutomationProxyImpl() |
317 // 1 is an unneeded timeout. | 317 // 1 is an unneeded timeout. |
318 : ChromeFrameAutomationProxyImpl(NULL, 1) { | 318 : ChromeFrameAutomationProxyImpl( |
| 319 NULL, AutomationProxy::GenerateChannelID(), 1) { |
319 } | 320 } |
320 MOCK_METHOD3( | 321 MOCK_METHOD3( |
321 SendAsAsync, | 322 SendAsAsync, |
322 void(IPC::SyncMessage* msg, | 323 void(IPC::SyncMessage* msg, |
323 SyncMessageReplyDispatcher::SyncMessageCallContext* context, | 324 SyncMessageReplyDispatcher::SyncMessageCallContext* context, |
324 void* key)); | 325 void* key)); |
325 void FakeChannelError() { | 326 void FakeChannelError() { |
326 reinterpret_cast<IPC::ChannelProxy::MessageFilter*>(message_filter_.get())-> | 327 reinterpret_cast<IPC::ChannelProxy::MessageFilter*>(message_filter_.get())-> |
327 OnChannelError(); | 328 OnChannelError(); |
328 } | 329 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 GURL("http://www.nonexistent.com"), empty, profile_path_, | 463 GURL("http://www.nonexistent.com"), empty, profile_path_, |
463 profile_path_.BaseName().value(), L"", L"", false, false, false)); | 464 profile_path_.BaseName().value(), L"", L"", false, false, false)); |
464 launch_params->set_launch_timeout(timeout); | 465 launch_params->set_launch_timeout(timeout); |
465 launch_params->set_version_check(false); | 466 launch_params->set_version_check(false); |
466 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); | 467 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); |
467 loop_.RunFor(10); | 468 loop_.RunFor(10); |
468 | 469 |
469 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); | 470 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); |
470 client_->Uninitialize(); | 471 client_->Uninitialize(); |
471 } | 472 } |
472 | |
OLD | NEW |