Index: blimp/engine/browser_tests/blimp_browser_test.h |
diff --git a/blimp/engine/browser_tests/blimp_browser_test.h b/blimp/engine/browser_tests/blimp_browser_test.h |
index a2990aa7210ee70867b00327d1d216bbd05c7ce0..4f54e84644326aa7af52e6cde42ff7c6270a44c5 100644 |
--- a/blimp/engine/browser_tests/blimp_browser_test.h |
+++ b/blimp/engine/browser_tests/blimp_browser_test.h |
@@ -8,6 +8,7 @@ |
#include <memory> |
#include "base/synchronization/waitable_event.h" |
+#include "base/threading/thread_restrictions.h" |
#include "content/public/test/browser_test_base.h" |
namespace base { |
@@ -46,6 +47,10 @@ class BlimpBrowserTest : public content::BrowserTestBase { |
// called. |
void RunUntilCompletion(); |
+ // Allow the UI thread to wait. This bypasses base::ThreadRestrictions and is |
+ // used for client/engine integration tests. |
+ void AllowUIWaits(); |
+ |
engine::BlimpEngineSession* GetEngineSession(); |
client::Assignment GetAssignment(); |
@@ -70,6 +75,11 @@ class BlimpBrowserTest : public content::BrowserTestBase { |
// RunUntilCompletion(). |
base::WaitableEvent completion_event_; |
+ // Used to allow UI thread waits. This is useful for integration tests that |
+ // require setting up client components, as testing those sometimes requires |
+ // setting up GL contexts that might block. |
+ std::unique_ptr<base::ThreadRestrictions::ScopedAllowWait> allow_ui_waits_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BlimpBrowserTest); |
}; |