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

Unified Diff: blimp/engine/browser_tests/blimp_browser_test.h

Issue 2320923002: Add a full Blimp integration test. (Closed)
Patch Set: Fix build break with chrome embedder Created 4 years, 3 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
« no previous file with comments | « blimp/engine/BUILD.gn ('k') | blimp/engine/browser_tests/blimp_browser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « blimp/engine/BUILD.gn ('k') | blimp/engine/browser_tests/blimp_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698