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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 10546139: Do the ReloadLocaleResources() call on the IO thread to avoid synchronization issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ui_test_utils:: for call within same namespace. Created 8 years, 6 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
Index: chrome/test/base/ui_test_utils.cc
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 779c1a9bf9b11747f87196874b5793938ad0d9e3..2460bd7255650a9a02643fda1b833935f5e47014 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -23,6 +23,7 @@
#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"
@@ -378,6 +379,13 @@ 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(
« chrome/browser/ui/webui/bidi_checker_web_ui_test.cc ('K') | « chrome/test/base/ui_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698