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

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

Issue 10019015: Update uses of TimeDelta in chrome_frame/*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 8 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 26 matching lines...) Expand all
37 } 37 }
38 38
39 void MockProxyFactory::GetServerImpl(ChromeFrameAutomationProxy* pxy, 39 void MockProxyFactory::GetServerImpl(ChromeFrameAutomationProxy* pxy,
40 void* proxy_id, 40 void* proxy_id,
41 AutomationLaunchResult result, 41 AutomationLaunchResult result,
42 LaunchDelegate* d, 42 LaunchDelegate* d,
43 ChromeFrameLaunchParams* params, 43 ChromeFrameLaunchParams* params,
44 void** automation_server_id) { 44 void** automation_server_id) {
45 *automation_server_id = proxy_id; 45 *automation_server_id = proxy_id;
46 loop_->PostDelayedTask(FROM_HERE, 46 loop_->PostDelayedTask(FROM_HERE,
47 base::Bind(&LaunchDelegate::LaunchComplete, 47 base::Bind(&LaunchDelegate::LaunchComplete,
48 base::Unretained(d), pxy, result), 48 base::Unretained(d), pxy, result),
49 params->launch_timeout() / 2); 49 base::TimeDelta::FromMilliseconds(params->launch_timeout()) / 2);
50 } 50 }
51 51
52 void CFACMockTest::SetAutomationServerOk(int times) { 52 void CFACMockTest::SetAutomationServerOk(int times) {
53 EXPECT_CALL(factory_, GetAutomationServer(testing::NotNull(), 53 EXPECT_CALL(factory_, GetAutomationServer(testing::NotNull(),
54 LaunchParamProfileEq(profile_path_.BaseName().value()), 54 LaunchParamProfileEq(profile_path_.BaseName().value()),
55 testing::NotNull())) 55 testing::NotNull()))
56 .Times(times) 56 .Times(times)
57 .WillRepeatedly(testing::Invoke(CreateFunctor(&factory_, 57 .WillRepeatedly(testing::Invoke(CreateFunctor(&factory_,
58 &MockProxyFactory::GetServerImpl, get_proxy(), id_, 58 &MockProxyFactory::GetServerImpl, get_proxy(), id_,
59 AUTOMATION_SUCCESS))); 59 AUTOMATION_SUCCESS)));
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 GURL("http://www.nonexistent.com"), empty, profile_path_, 463 GURL("http://www.nonexistent.com"), empty, profile_path_,
464 profile_path_.BaseName().value(), L"", false, false, false, false)); 464 profile_path_.BaseName().value(), L"", false, false, false, false));
465 launch_params->set_launch_timeout(timeout); 465 launch_params->set_launch_timeout(timeout);
466 launch_params->set_version_check(false); 466 launch_params->set_version_check(false);
467 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params)); 467 EXPECT_TRUE(client_->Initialize(&cfd_, launch_params));
468 loop_.RunFor(base::TimeDelta::FromSeconds(10)); 468 loop_.RunFor(base::TimeDelta::FromSeconds(10));
469 469
470 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1); 470 EXPECT_CALL(mock_proxy_, ReleaseTabProxy(testing::Eq(tab_handle_))).Times(1);
471 client_->Uninitialize(); 471 client_->Uninitialize();
472 } 472 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698