diff options
author | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 00:45:33 +0000 |
---|---|---|
committer | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-27 00:45:33 +0000 |
commit | 02798a98ff76ed7f21c446dfb76e9d46f561d5cf (patch) | |
tree | 8446dcbb05cf2630a715fe84e517f477f2f99546 /chrome/browser/unload_uitest.cc | |
parent | 1d7382f2c7d71448dc1c2292ff104b814f1308ec (diff) | |
download | chromium_src-02798a98ff76ed7f21c446dfb76e9d46f561d5cf.zip chromium_src-02798a98ff76ed7f21c446dfb76e9d46f561d5cf.tar.gz chromium_src-02798a98ff76ed7f21c446dfb76e9d46f561d5cf.tar.bz2 |
Convert use of int ms to TimeDelta in files owned by brettw.
BUG=108171
TEST=
Review URL: http://codereview.chromium.org/9233018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/unload_uitest.cc')
-rw-r--r-- | chrome/browser/unload_uitest.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc index 3ef1290..7058e27 100644 --- a/chrome/browser/unload_uitest.cc +++ b/chrome/browser/unload_uitest.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. @@ -16,6 +16,8 @@ #include "ui/base/events.h" #include "ui/base/ui_base_types.h" +using base::TimeDelta; + const std::string NOLISTENERS_HTML = "<html><head><title>nolisteners</title></head><body></body></html>"; @@ -105,12 +107,12 @@ class UnloadTest : public UITest { } void CheckTitle(const std::wstring& expected_title) { - const int kCheckDelayMs = 100; - for (int max_wait_time = TestTimeouts::action_max_timeout_ms(); - max_wait_time > 0; max_wait_time -= kCheckDelayMs) { + const TimeDelta kCheckDelay = TimeDelta::FromMilliseconds(100); + for (TimeDelta max_wait_time = TestTimeouts::action_max_timeout(); + max_wait_time > TimeDelta(); max_wait_time -= kCheckDelay) { if (expected_title == GetActiveTabTitle()) break; - base::PlatformThread::Sleep(kCheckDelayMs); + base::PlatformThread::Sleep(kCheckDelay); } EXPECT_EQ(expected_title, GetActiveTabTitle()); @@ -304,7 +306,7 @@ TEST_F(UnloadTest, BrowserCloseBeforeUnloadCancel) { // There's no real graceful way to wait for something _not_ to happen, so // we just wait a short period. - base::PlatformThread::Sleep(TestTimeouts::action_timeout_ms()); + base::PlatformThread::Sleep(TestTimeouts::action_timeout()); CloseBrowserAsync(browser.get()); ClickModalDialogButton(ui::DIALOG_BUTTON_OK); |