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( | 318 : ChromeFrameAutomationProxyImpl(NULL, 1) { |
319 NULL, AutomationProxy::GenerateChannelID(), 1) { | |
320 } | 319 } |
321 MOCK_METHOD3( | 320 MOCK_METHOD3( |
322 SendAsAsync, | 321 SendAsAsync, |
323 void(IPC::SyncMessage* msg, | 322 void(IPC::SyncMessage* msg, |
324 SyncMessageReplyDispatcher::SyncMessageCallContext* context, | 323 SyncMessageReplyDispatcher::SyncMessageCallContext* context, |
325 void* key)); | 324 void* key)); |
326 void FakeChannelError() { | 325 void FakeChannelError() { |
327 reinterpret_cast<IPC::ChannelProxy::MessageFilter*>(message_filter_.get())-> | 326 reinterpret_cast<IPC::ChannelProxy::MessageFilter*>(message_filter_.get())-> |
328 OnChannelError(); | 327 OnChannelError(); |
329 } | 328 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 GURL("http://www.nonexistent.com"), empty, profile_path_, | 462 GURL("http://www.nonexistent.com"), empty, profile_path_, |
464 profile_path_.BaseName().value(), L"", L"", false, false, false)); | 463 profile_path_.BaseName().value(), L"", L"", false, false, false)); |
465 launch_params->set_launch_timeout(timeout); | 464 launch_params->set_launch_timeout(timeout); |
466 launch_params->set_version_check(false); | 465 launch_params->set_version_check(false); |
467 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); | 466 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); |
468 loop_.RunFor(10); | 467 loop_.RunFor(10); |
469 | 468 |
470 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); | 469 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); |
471 client_->Uninitialize(); | 470 client_->Uninitialize(); |
472 } | 471 } |
| 472 |
OLD | NEW |