diff options
author | scr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-20 03:23:24 +0000 |
---|---|---|
committer | scr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-20 03:23:24 +0000 |
commit | 3eb52e887d339d444c7d35e4c82e1efa69272887 (patch) | |
tree | 9004e34ca11be0de03b44db4a47dc65d7127403f /chrome/test/base | |
parent | 4e04f1e43ab424605a03ccf3bc6e4b0aba01dfb0 (diff) | |
download | chromium_src-3eb52e887d339d444c7d35e4c82e1efa69272887.zip chromium_src-3eb52e887d339d444c7d35e4c82e1efa69272887.tar.gz chromium_src-3eb52e887d339d444c7d35e4c82e1efa69272887.tar.bz2 |
Some Bidi cleanup to share code and use PostTaskAndReply rather than WaitableEvent.
https://chromiumcodereview.appspot.com/10546139/#msg8 mentions desire to use
PostTaskAndReply with QuitClosure() rather than WaitableEvent to reuse ui_test_utils code.
Also, the SetUp/CleanUp don't need to be static methods and seem common enough to share the
posting and handling code just as anonymous namespace functions.
R=tony@chromium.org, estade@chromium.org
BUG=95425, 132752
TEST=browser_tests --gtest_filter=WebUIBidiCheckerBrowserTestRTL.*TestSettingsFrameStartup
Review URL: https://chromiumcodereview.appspot.com/10578019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143136 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/base')
-rw-r--r-- | chrome/test/base/ui_test_utils.cc | 8 | ||||
-rw-r--r-- | chrome/test/base/ui_test_utils.h | 8 |
2 files changed, 0 insertions, 16 deletions
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc index f1b27b0..09702cb 100644 --- a/chrome/test/base/ui_test_utils.cc +++ b/chrome/test/base/ui_test_utils.cc @@ -23,7 +23,6 @@ #include "base/rand_util.h" #include "base/string_number_conversions.h" #include "base/test/test_timeouts.h" -#include "base/threading/platform_thread.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "base/values.h" @@ -379,13 +378,6 @@ Browser* WaitForBrowserNotInSet(std::set<Browser*> excluded_browsers) { return new_browser; } -void WaitEventSignaled(base::WaitableEvent* event) { - while (!event->IsSignaled()) { - base::PlatformThread::YieldCurrentThread(); - RunAllPendingInMessageLoop(); - } -} - void OpenURLOffTheRecord(Profile* profile, const GURL& url) { Browser::OpenURLOffTheRecord(profile, url); Browser* browser = browser::FindTabbedBrowser( diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h index d21875c..d16274a 100644 --- a/chrome/test/base/ui_test_utils.h +++ b/chrome/test/base/ui_test_utils.h @@ -54,10 +54,6 @@ class SkBitmap; class TabContents; class TemplateURLService; -namespace base { -class WaitableEvent; -} - namespace browser { struct NavigateParams; } @@ -130,10 +126,6 @@ void WaitForLoadStop(content::WebContents* tab); // Use BrowserAddedObserver instead. Browser* WaitForNewBrowser(); -// Waits for |event| to be signaled running message loop in the current thread -// while waiting. -void WaitEventSignaled(base::WaitableEvent* event); - // Opens |url| in an incognito browser window with the incognito profile of // |profile|, blocking until the navigation finishes. This will create a new // browser if a browser with the incognito profile does not exist. |