Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: chrome_frame/test/automation_client_mock.cc

Issue 10787010: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_automation.cc ('k') | chrome_frame/test/perf/chrome_frame_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698