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

Unified Diff: chrome/browser/unload_uitest.cc

Issue 9185026: Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Explicitly include base/time.h in header file. Created 8 years, 11 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/browser/translate/translate_manager.cc ('k') | chrome/browser/visitedlink/visitedlink_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/unload_uitest.cc
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc
index 3ef129024c7429b0a6c9fc23f682fc56893c9278..e6a199d1f4c7dc4e0a162ca57f01da065778553e 100644
--- a/chrome/browser/unload_uitest.cc
+++ b/chrome/browser/unload_uitest.cc
@@ -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);
« no previous file with comments | « chrome/browser/translate/translate_manager.cc ('k') | chrome/browser/visitedlink/visitedlink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698