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

Unified Diff: chrome_frame/test/urlmon_moniker_integration_test.cc

Issue 10053004: Use TimeDelta for Chrome Frame test's TimedMsgLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/test/url_request_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/urlmon_moniker_integration_test.cc
diff --git a/chrome_frame/test/urlmon_moniker_integration_test.cc b/chrome_frame/test/urlmon_moniker_integration_test.cc
index 7c656a8cef9a9a09ceea6ffd71df7ea5d2a1a5c2..2937df40fd408277163a8a92c6aab7654f2ddff8 100644
--- a/chrome_frame/test/urlmon_moniker_integration_test.cc
+++ b/chrome_frame/test/urlmon_moniker_integration_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -31,7 +31,8 @@ using testing::DoAll;
using testing::WithArgs;
-static int kUrlmonMonikerTimeoutSec = 5;
+static const base::TimeDelta kUrlmonMonikerTimeout =
+ base::TimeDelta::FromSeconds(5);
namespace {
const char kTestContent[] = "<html><head>"
@@ -81,7 +82,7 @@ class RunTestServer : public base::Thread {
}
bool wait_until_ready() {
- return ::WaitForSingleObject(ready_, kUrlmonMonikerTimeoutSec * 1000)
+ return ::WaitForSingleObject(ready_, kUrlmonMonikerTimeout.InMilliseconds())
== WAIT_OBJECT_0;
}
@@ -250,7 +251,7 @@ TEST_F(UrlmonMonikerTest, BindToStorageAsynchronous) {
HRESULT hr = callback.CreateUrlMonikerAndBindToStorage(test_url,
bind_ctx.Receive());
EXPECT_EQ(MK_S_ASYNCHRONOUS, hr);
- test.loop().RunFor(kUrlmonMonikerTimeoutSec);
+ test.loop().RunFor(kUrlmonMonikerTimeout);
IBindCtx* release = bind_ctx.Detach();
EXPECT_EQ(0, release->Release());
@@ -288,7 +289,7 @@ TEST_F(UrlmonMonikerTest, BindToStorageSwitchContent) {
HRESULT hr = callback.CreateUrlMonikerAndBindToStorage(test_url, NULL);
EXPECT_EQ(MK_S_ASYNCHRONOUS, hr);
- test.loop().RunFor(kUrlmonMonikerTimeoutSec);
+ test.loop().RunFor(kUrlmonMonikerTimeout);
scoped_refptr<RequestData> request_data(
test.nav_manager().GetActiveRequestData(test_url));
@@ -332,7 +333,7 @@ TEST_F(UrlmonMonikerTest, BindToStorageCachedContent) {
HRESULT hr = callback.CreateUrlMonikerAndBindToStorage(test_url, NULL);
EXPECT_EQ(MK_S_ASYNCHRONOUS, hr);
- test.loop().RunFor(kUrlmonMonikerTimeoutSec);
+ test.loop().RunFor(kUrlmonMonikerTimeout);
scoped_refptr<RequestData> request_data(
test.nav_manager().GetActiveRequestData(test_url));
« no previous file with comments | « chrome_frame/test/url_request_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698