summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser_focus_uitest.cc
diff options
context:
space:
mode:
authorxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 22:02:11 +0000
committerxhwang@chromium.org <xhwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 22:02:11 +0000
commit3264d16a00887b248d4828dbf136b3d8db8381a6 (patch)
treef15695d5ddeba58bec42e03c84a64ed0b33392a2 /chrome/browser/ui/browser_focus_uitest.cc
parent14bd554b95adc002247427614aeb70c213132282 (diff)
downloadchromium_src-3264d16a00887b248d4828dbf136b3d8db8381a6.zip
chromium_src-3264d16a00887b248d4828dbf136b3d8db8381a6.tar.gz
chromium_src-3264d16a00887b248d4828dbf136b3d8db8381a6.tar.bz2
chrome: Use base::MessageLoop. (Part 2)
This CL updates chrome/browser/ui/* BUG=236029 Review URL: https://chromiumcodereview.appspot.com/14307023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199024 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_focus_uitest.cc')
-rw-r--r--chrome/browser/ui/browser_focus_uitest.cc25
1 files changed, 14 insertions, 11 deletions
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc
index 9825fda..1f22006 100644
--- a/chrome/browser/ui/browser_focus_uitest.cc
+++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -140,9 +140,10 @@ bool ChromeInForeground() {
void CheckFocus(Browser* browser, ViewID id, const base::Time& timeout) {
if (ui_test_utils::IsViewFocused(browser, id) ||
base::Time::Now() > timeout) {
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::QuitClosure());
} else {
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CheckFocus, browser, id, timeout),
base::TimeDelta::FromMilliseconds(10));
@@ -162,7 +163,7 @@ class BrowserFocusTest : public InProcessBrowserTest {
bool WaitForFocusChange(ViewID vid) {
const base::Time timeout = base::Time::Now() +
base::TimeDelta::FromMilliseconds(kFocusChangeTimeoutMs);
- MessageLoop::current()->PostDelayedTask(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&CheckFocus, browser(), vid, timeout),
base::TimeDelta::FromMilliseconds(100));
@@ -218,9 +219,9 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_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(
+ base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- MessageLoop::QuitClosure(),
+ base::MessageLoop::QuitClosure(),
base::TimeDelta::FromMilliseconds(kActionDelayMs));
content::RunMessageLoop();
#endif // defined(OS_POSIX)
@@ -625,9 +626,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
browser()->tab_strip_model()->GetActiveWebContents(),
true, GURL("http://interstitial.com"));
// Give some time for the interstitial to show.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(),
- base::TimeDelta::FromSeconds(1));
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::MessageLoop::QuitClosure(),
+ base::TimeDelta::FromSeconds(1));
content::RunMessageLoop();
chrome::FocusLocationBar(browser());
@@ -746,9 +748,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_InterstitialFocus) {
browser()->tab_strip_model()->GetActiveWebContents(),
true, GURL("http://interstitial.com"));
// Give some time for the interstitial to show.
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- MessageLoop::QuitClosure(),
- base::TimeDelta::FromSeconds(1));
+ base::MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::MessageLoop::QuitClosure(),
+ base::TimeDelta::FromSeconds(1));
content::RunMessageLoop();
// The interstitial should have focus now.