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

Unified Diff: chrome/browser/browser_focus_uitest.cc

Issue 9572036: Convert uses of int ms to TimeDelta in chrome/browser and net. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add more TimeDelta integration. Created 8 years, 10 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 | « no previous file | chrome/browser/debugger/devtools_sanity_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_focus_uitest.cc
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 42b20ffad831556b79bb54db74ecdf53e7fb064e..13d5042e197889fc1bf649f9fec1fd0dccdc4015 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -145,7 +145,7 @@ void CheckFocus(Browser* browser, ViewID id, const base::Time& timeout) {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CheckFocus, browser, id, timeout),
- 10);
+ base::TimeDelta::FromMilliseconds(10));
}
};
@@ -176,7 +176,7 @@ class BrowserFocusTest : public InProcessBrowserTest {
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CheckFocus, browser(), vid, timeout),
- 100);
+ base::TimeDelta::FromMilliseconds(100));
ui_test_utils::RunMessageLoop();
return IsViewFocused(vid);
}
@@ -225,9 +225,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, ClickingMovesFocus) {
#if defined(OS_POSIX)
// It seems we have to wait a little bit for the widgets to spin up before
// we can start clicking on them.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(),
- kActionDelayMs);
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ MessageLoop::QuitClosure(),
+ base::TimeDelta::FromMilliseconds(kActionDelayMs));
ui_test_utils::RunMessageLoop();
#endif // defined(OS_POSIX)
@@ -627,7 +628,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
// Give some time for the interstitial to show.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
MessageLoop::QuitClosure(),
- 1000);
+ base::TimeDelta::FromSeconds(1));
ui_test_utils::RunMessageLoop();
browser()->FocusLocationBar();
@@ -752,7 +753,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, InterstitialFocus) {
// Give some time for the interstitial to show.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
MessageLoop::QuitClosure(),
- 1000);
+ base::TimeDelta::FromSeconds(1));
ui_test_utils::RunMessageLoop();
// The interstitial should have focus now.
« no previous file with comments | « no previous file | chrome/browser/debugger/devtools_sanity_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698