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( |